1400 |
Is it possible to define my values for sorting
public void init() { COM com_Items; anytype var_Items; int h; ; super(); COM::createFromVariant(exg2antt1.Columns().Add("C1")).SortType(6/*SortUserDataString*/); exg2antt1.Columns().Add("C2"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Cell 1"); com_Items.CellData(h,COMVariant::createFromInt(0),"3.your extra data"); com_Items.CellValue(h,COMVariant::createFromInt(1),"SortValue=3"); h = com_Items.AddItem("Cell 1.1"); com_Items.CellData(h,COMVariant::createFromInt(0),"1.your extra data"); com_Items.CellValue(h,COMVariant::createFromInt(1)," SortValue=1"); h = com_Items.AddItem("Cell 1.2"); com_Items.CellData(h,COMVariant::createFromInt(0),"5.your extra data"); com_Items.CellValue(h,COMVariant::createFromInt(1)," SortValue=5"); h = com_Items.AddItem("Cell 1.3"); com_Items.CellData(h,COMVariant::createFromInt(0),"2.your extra data"); com_Items.CellValue(h,COMVariant::createFromInt(1)," SortValue=2"); } |
1399 |
I have multiple dropdown lists, that are depending on each other, that means that the values in dropdown list no. 2 is based on the users selection in dropdown list no 1. How can I do this
// EditOpen event - Occurs when the edit operation starts. void onEvent_EditOpen() { COM com_Column,com_Editor,com_Items; COMVariant v; anytype var_Column,var_Editor,var_Items; str c; ; var_Items = exg2antt1.Items(); com_Items = var_Items; v = com_Items.CellValue(com_Items.FocusItem(),COMVariant::createFromInt(0)); c = com_Items.CellCaption(com_Items.FocusItem(),COMVariant::createFromInt(0)); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(1)); com_Column = var_Column; var_Editor = com_Column.Editor(); com_Editor = var_Editor; com_Editor.ClearItems(); com_Editor.AddItem(v,c); } public void init() { COM com_Column,com_Editor,com_Editor1,com_Items; COMVariant v; anytype var_Column,var_Editor,var_Editor1,var_Items; int h; str c,var_s; ; super(); exg2antt1.BeginUpdate(); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("DropDownList")); com_Column = var_Column; var_Editor = com_Column.Editor(); com_Editor = var_Editor; com_Editor.EditType(3/*DropDownListType*/); com_Editor.AddItem(1,"First"); com_Editor.AddItem(2,"Second"); com_Editor.AddItem(3,"Third"); exg2antt1.DrawGridLines(-1/*exAllLines*/); var_Editor1 = COM::createFromObject(COM::createFromVariant(exg2antt1.Columns().Add("DropDownList-Related"))).Editor(); com_Editor1 = var_Editor1; com_Editor1.EditType(3/*DropDownListType*/); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.CellValue(com_Items.AddItem(COMVariant::createFromInt(1)),COMVariant::createFromInt(1),COMVariant::createFromInt(-1)); com_Items.CellValue(com_Items.AddItem(COMVariant::createFromInt(2)),COMVariant::createFromInt(1),COMVariant::createFromInt(-1)); com_Items.CellValue(com_Items.AddItem(COMVariant::createFromInt(3)),COMVariant::createFromInt(1),COMVariant::createFromInt(-1)); com_Items.LockedItemCount(2/*exBottom*/,1); h = com_Items.LockedItem(2/*exBottom*/,0); com_Items.ItemDivider(h,0); com_Items.ItemDividerLineAlignment(h,2/*DividerTop*/); com_Items.CellEditorVisible(h,COMVariant::createFromInt(0),false); com_Items.CellSingleLine(h,COMVariant::createFromInt(0),false); com_Items.CellValueFormat(h,COMVariant::createFromInt(0),1/*exHTML*/); var_s = "The drop down editor in the second column is filled during the <b>EditOpen event</b>, and the values are based on the selection "; var_s = var_s + "on the first column."; com_Items.CellValue(h,COMVariant::createFromInt(0),COMVariant::createFromStr(var_s)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1398 |
Is it possible background color displayed when the mouse passes over an item
public void init() { COM com_Items; anytype var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Def"); exg2antt1.HotBackColor(WinApi::RGB2int(0,0,128)); exg2antt1.HotForeColor(WinApi::RGB2int(255,255,255)); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("Item A"); com_Items.AddItem("Item B"); com_Items.AddItem("Item C"); exg2antt1.EndUpdate(); } |
1397 |
Is it possible to magnify a specified date and apply a different background color
public void init() { COM com_Chart,com_InsideZoom,com_InsideZoomFormat,com_InsideZooms,com_Items; anytype var_Chart,var_InsideZoom,var_InsideZoomFormat,var_InsideZooms,var_Items; int hA,hB; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.DrawLevelSeparator(false); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,64); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("11/23/2011",213))); com_Chart.LevelCount(3); com_Chart.FirstWeekDay(1/*exMonday*/); com_Chart.AllowInsideZoom(true); var_InsideZooms = COM::createFromObject(com_Chart.InsideZooms()); com_InsideZooms = var_InsideZooms; var_InsideZoom = COM::createFromObject(com_InsideZooms).Add(COMVariant::createFromDate(str2Date("11/29/2011",213))); com_InsideZoom = var_InsideZoom; com_InsideZoom.AllowCustomFormat(true); var_InsideZoom = COM::createFromObject(com_Chart.InsideZooms()).Item(COMVariant::createFromDate(str2Date("11/29/2011",213))); com_InsideZoom = var_InsideZoom; com_InsideZoom.Width(68); var_InsideZoomFormat = COM::createFromObject(com_InsideZoom.CustomFormat()); com_InsideZoomFormat = var_InsideZoomFormat; com_InsideZoomFormat.BackColorChart(WinApi::RGB2int(224,224,224)); var_Items = exg2antt1.Items(); com_Items = var_Items; hA = com_Items.AddItem("Task A"); com_Items.AddBar(hA,"Task",COMVariant::createFromDate(str2Date("11/24/2011",213)),COMVariant::createFromDate(str2Date("11/26/2011",213)),"A"); hB = com_Items.AddItem("Task B"); com_Items.AddBar(hB,"Task",COMVariant::createFromDate(str2Date("11/28/2011",213)),COMVariant::createFromDate(str2Date("12/1/2011",213)),"B"); com_Items.AddLink("LinkAB",hA,"A",hB,"B"); com_Items.Link("LinkAB",9/*exLinkStyle*/,COMVariant::createFromInt(2)); com_Items.Link("LinkAB",10/*exLinkWidth*/,COMVariant::createFromInt(2)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,64); } */ |
1396 |
Could you please tell me how to add multiple bars to the one line
public void init() { COM com_Items; anytype var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2002",213))); exg2antt1.Columns().Add("Task"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2002",213)),COMVariant::createFromDate(str2Date("1/4/2002",213)),"A"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/6/2002",213)),COMVariant::createFromDate(str2Date("1/10/2002",213)),"B"); com_Items.ItemBar(h,"A",33/*exBarColor*/,COMVariant::createFromInt(255)); com_Items.AddLink("AB",h,"A",h,"B"); exg2antt1.EndUpdate(); } |
1395 |
My development environment does not have any Object,GetOcx,DefaultDispatch,GetControlUnknown,nativeObject, ... property, is there any alternative I can pass the component to PrintExt so I can get printed
public void init() { COM com_Items; anytype var_Items; int h1,h2; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); h2 = com_Items.AddItem("Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"K2"); com_Items.AddLink("L1",h1,"K1",h2,"K2"); com_Items.Link("L1",6/*exLinkStartPos*/,COMVariant::createFromInt(0)); exg2antt1.EndUpdate(); exg2antt1.Template("Dim p;p = CreateObject(`Exontrol.Print`);p.PrintExt = Me;p.AutoRelease = False;p.Preview();"); } |
1394 |
My development environment does not have any Object,GetOcx,DefaultDispatch,GetControlUnknown,nativeObject, ... property, is there any alternative I can pass the component to PrintExt so I can get printed
public void init() { COM com_Items,com_Print; anytype var_Items,var_Print; int h1,h2; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); h2 = com_Items.AddItem("Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"K2"); com_Items.AddLink("L1",h1,"K1",h2,"K2"); com_Items.Link("L1",6/*exLinkStartPos*/,COMVariant::createFromInt(0)); exg2antt1.EndUpdate(); // Add 'exprint.dll(ExPrint.dll)' reference to your project. // Add 'ExPrint 1.0 Control Library(ExPrint.dll)' reference to your project. var_Print = COM::createFromObject(new EXPRINTLib.exprint()); com_Print = var_Print; com_Print.PrintExt(exg2antt1.ExecuteTemplate("me")); com_Print.Preview(); } |
1393 |
Is it possible to display the bar's captions or labels with a different font/size
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); exg2antt1.DefaultItemHeight(24); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,64); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.LevelCount(2); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Default"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"","This is a the control's font"); com_Items.ItemBar(h,"",4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); h = com_Items.AddItem("Smaller"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"","<font ;5>This is a the control's font with a smaller size"); com_Items.ItemBar(h,"",4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); h = com_Items.AddItem("Larger"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"","<font ;15>This is a the control's font with a larger size"); com_Items.ItemBar(h,"",4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); h = com_Items.AddItem("Tahoma 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"","<font Tahoma>This is using a Tahoma font"); com_Items.ItemBar(h,"",4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); h = com_Items.AddItem("Tahoma 2"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"","<font Tahoma;14>This is using a <b>Tahoma</b> font with a different size"); com_Items.ItemBar(h,"",4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,64); } */ |
1392 |
How can I apply the same ConditionalFormat on more than 1(one) column (multiple columns and not on item)
public void init() { COM com_Columns,com_ConditionalFormat,com_ConditionalFormat1,com_Items; anytype var_Columns,var_ConditionalFormat,var_ConditionalFormat1,var_Items; ; super(); exg2antt1.BeginUpdate(); var_ConditionalFormat = COM::createFromObject(exg2antt1.ConditionalFormats()).Add("1","K1"); com_ConditionalFormat = var_ConditionalFormat; com_ConditionalFormat.BackColor(WinApi::RGB2int(255,0,0)); com_ConditionalFormat.ApplyTo(1); var_ConditionalFormat1 = COM::createFromObject(exg2antt1.ConditionalFormats()).Add("1","K2"); com_ConditionalFormat1 = var_ConditionalFormat1; com_ConditionalFormat1.BackColor(WinApi::RGB2int(255,0,0)); com_ConditionalFormat1.ApplyTo(2); exg2antt1.MarkSearchColumn(false); exg2antt1.DrawGridLines(-2/*exRowLines*/); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("Column 1"); com_Columns.Add("Column 2"); com_Columns.Add("Column 3"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(); com_Items.AddItem(); com_Items.AddItem(); exg2antt1.EndUpdate(); } |
1391 |
Is it possible to change the height for all items at once
public void init() { COM com_Items; anytype var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); exg2antt1.Columns().Add("Items"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Root 1"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); h = com_Items.AddItem("Root 2"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); com_Items.ExpandItem(0,true); exg2antt1.EndUpdate(); exg2antt1.DefaultItemHeight(12); exg2antt1.Items().ItemHeight(0,12); } |
1390 |
Is it possible to include the weekday when displaying the date
public void init() { COM com_Chart,com_Column,com_Column1,com_Columns,com_Items; anytype var_Chart,var_Column,var_Column1,var_Columns,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.MarkSearchColumn(false); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("Tasks"); var_Column = COM::createFromVariant(com_Columns.Add("Start")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); com_Column.Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1)); com_Column.FormatColumn("value + '<font ;6> ' + (weekday(date(value)) case(0:'Sun';1:'Mon';2:'Tue';3:'Wed';4:'Thu';5:'Fri';6:'Sat'))"); var_Column1 = COM::createFromVariant(com_Columns.Add("End")); com_Column1 = var_Column1; com_Column1.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2)); com_Column1.Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1)); com_Column1.FormatColumn("value + '<font ;6> ' + (weekday(date(value)) case(0:'Sun';1:'Mon';2:'Tue';3:'Wed';4:'Thu';5:'Fri';6:'Sat'))"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("9/20/2006",213))); com_Chart.AllowLinkBars(false); com_Chart.AllowCreateBar(0/*exNoCreateBar*/); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,256); com_Chart.NonworkingDays(0); com_Chart.FirstWeekDay(1/*exMonday*/); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("9/21/2006",213)),COMVariant::createFromDate(str2Date("9/24/2006",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("9/22/2006",213)),COMVariant::createFromDate(str2Date("9/25/2006",213))); com_Items.AddBar(com_Items.AddItem("Task 3"),"Task",COMVariant::createFromDate(str2Date("9/23/2006",213)),COMVariant::createFromDate(str2Date("9/26/2006",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,256); } */ |
1389 |
I need my chart to display the end date with on day less. How can I do this (Method 1)
public void init() { COM com_Chart,com_Column,com_Columns,com_Items; anytype var_Chart,var_Column,var_Columns,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.MarkSearchColumn(false); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("Tasks"); COM::createFromVariant(com_Columns.Add("Start")).Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); var_Column = COM::createFromVariant(com_Columns.Add("End")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2)); com_Column.FormatColumn("shortdate(date(value)-1)"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("9/20/2006",213))); com_Chart.AllowLinkBars(false); com_Chart.AllowCreateBar(0/*exNoCreateBar*/); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,196); com_Chart.NonworkingDays(0); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AllowCellValueToItemBar(true); com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("9/21/2006",213)),COMVariant::createFromDate(str2Date("9/24/2006",213))); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("9/22/2006",213)),COMVariant::createFromDate(str2Date("9/25/2006",213))); com_Items.AddBar(com_Items.AddItem("Task 3"),"Task",COMVariant::createFromDate(str2Date("9/23/2006",213)),COMVariant::createFromDate(str2Date("9/26/2006",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,196); } */ |
1388 |
Is it possible to display my custom time-units
public void init() { COM com_Chart,com_Level,com_Level1; anytype var_Chart,var_Level,var_Level1; ; super(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,0); com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromInt(0)); com_Chart.NonworkingDays(0); var_Level = com_Chart.Level(0); com_Level = var_Level; com_Level.Unit(4096/*exDay*/); com_Level.Count(16); com_Level.Alignment(1/*CenterAlignment*/); com_Level.Label("<%i%>"); com_Level.FormatLabel("'Half ' + (1 + (value/16) mod 2)"); var_Level1 = com_Chart.Level(1); com_Level1 = var_Level1; com_Level1.Label("<%i%>"); com_Level1.FormatLabel("1 + value mod 16"); com_Level1.ReplaceLabel(2,"<font ;10><B>Y"); com_Chart.AdjustLevelsToBase(true); com_Chart.ScrollRange(0/*exStartDate*/,COMVariant::createFromInt(0)); com_Chart.ScrollRange(1/*exEndDate*/,COMVariant::createFromInt(31)); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,0); } */ |
1387 |
Is it possible to add new records and see them in the control's view using the DataSource
// AddItem event - Occurs after a new Item has been inserted to Items collection. void onEvent_AddItem(int _Item) { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.SelectItem(_Item,true); com_Items.EnsureVisibleItem(_Item); exg2antt1.Edit(COMVariant::createFromInt(0)); } // ButtonClick event - Occurs when user clicks on the cell's button. void onEvent_ButtonClick(int _Item,int _ColIndex,COMVariant _Key) { ; exg2antt1.DataSource().AddNew(); } public void init() { COM com_Items,com_rs; anytype rs,var_Items; int h; ; super(); // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs; rs.Append("Task",8/*adBSTR*/); rs.Append("Start",7/*adDate*/); rs.Append("End",7/*adDate*/); rs.Open(); exg2antt1.DrawGridLines(-2/*exRowLines*/); exg2antt1.DetectAddNew(true); exg2antt1.DetectDelete(true); exg2antt1.DataSource(rs); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.LockedItemCount(0/*exTop*/,1); h = com_Items.LockedItem(0/*exTop*/,0); com_Items.ItemDivider(h,0); com_Items.ItemHeight(h,22); com_Items.CellValue(h,COMVariant::createFromInt(0),"AddNew"); com_Items.CellHasButton(h,COMVariant::createFromInt(0),true); com_Items.CellHAlignment(h,COMVariant::createFromInt(0),1/*CenterAlignment*/); } |
1386 |
How can I limit the bars to scrolling range only
// CreateBar event - Fired when the user creates a new bar. void onEvent_CreateBar(int _Item,date _DateStart,date _DateEnd) { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.ItemBar(_Item,"newbar",22/*exBarMinStart*/,exg2antt1.Chart().ScrollRange(2/*exMinDate*/)); com_Items.ItemBar(_Item,"newbar",25/*exBarMaxEnd*/,exg2antt1.Chart().ScrollRange(3/*exMaxDate*/)); } public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,56); com_Chart.ScrollRange(0/*exStartDate*/,COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.ScrollRange(1/*exEndDate*/,COMVariant::createFromDate(str2Date("1/15/2001",213))); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/12/2001",213))); com_Chart.AllowCreateBar(1/*exCreateBarAuto*/); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("Task 1"); com_Items.AddItem("Task 2"); com_Items.AddItem("Task 3"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,56); } */ |
1385 |
How do I get the handle of the last added item
public void init() { COM com_Items; anytype var_Items; ; super(); exg2antt1.Columns().Add("Def"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(COMVariant::createFromInt(1)); com_Items.AddItem(COMVariant::createFromInt(2)); print( com_Items.ItemByIndex(com_Items.ItemCount()) ); } |
1384 |
How can I set the charts date format to any other international Format then the US version. I would need "dd.mmm.yyyy" instead of "mmm.d.'yy"
|
1383 |
Is it possible to define the bar colors, and have the cumulative histogram showing the same colors
public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; int h,h1; ; super(); exg2antt1.BeginUpdate(); exg2antt1.SingleSel(false); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.AllowLinkBars(false); com_Chart.DrawGridLines(-1/*exAllLines*/); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/24/2000",213))); com_Chart.HistogramVisible(true); com_Chart.HistogramHeight(64); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,128); com_Chart.HistogramView(1298/*exHistogramNoGrouping | exHistogramLeafItems | exHistogramUnlockedItems | exHistogramSelectedItems*/); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.HistogramType(256/*exHistCumulative*/); com_Bar.HistogramItems(6); com_Bar.HistogramPattern(com_Bar.Pattern()); com_Bar.HistogramCumulativeOriginalColorBars(1/*exKeepOriginalColor*/); com_Bar.OverlaidType(1/*exOverlaidBarsOffset*/); exg2antt1.Columns().Add("Column"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project"); com_Items.ItemBold(h,true); com_Items.SelectableItem(h,false); h1 = com_Items.InsertItem(h,,"Item 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213))); h1 = com_Items.InsertItem(h,,"Item 2"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213))); h1 = com_Items.InsertItem(h,,"Item 3"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213))); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/1/2001",213)),COMVariant::createFromDate(str2Date("1/3/2001",213)),"green"); com_Items.ItemBar(h1,"green",33/*exBarColor*/,COMVariant::createFromInt(65280)); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"red"); com_Items.ItemBar(h1,"red",33/*exBarColor*/,COMVariant::createFromInt(255)); com_Items.ExpandItem(h,true); com_Items.SelectAll(); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,128); } */ |
1382 |
How can I hide the values shown in the legend when cumulative histogram is displayed
public void init() { COM com_Bar,com_Chart,com_Column,com_Items; anytype var_Bar,var_Chart,var_Column,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.HistogramVisible(true); com_Chart.HistogramHeight(64); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,128); com_Chart.HistogramView(1300/*exHistogramNoGrouping | exHistogramLeafItems | exHistogramUnlockedItems | exHistogramCheckedItems*/); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.HistogramPattern(1/*exPatternSolid*/); com_Bar.HistogramType(256/*exHistCumulative*/); com_Bar.HistogramItems(6); com_Bar.HistogramRulerLinesColor(WinApi::RGB2int(128,0,0)); com_Bar.HistogramBorderColor(WinApi::RGB2int(1,0,0)); com_Bar.HistogramCumulativeShowLegend(65535); com_Bar.HistogramCumulativeOriginalColorBars(false); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Column")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.PartialCheck(true); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project 1"); com_Items.AddBar(com_Items.InsertItem(h,,"Item 1"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213))); com_Items.AddBar(com_Items.InsertItem(h,,"Item 2"),"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213))); com_Items.AddBar(com_Items.InsertItem(h,,"Item 3"),"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213))); com_Items.AddBar(com_Items.InsertItem(h,,"Item 4"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213))); com_Items.CellState(com_Items.ItemByIndex(1),COMVariant::createFromInt(0),1); com_Items.ExpandItem(h,true); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,128); } */ |
1381 |
Is it possible to define the bar colors, and have the cumulative histogram showing the same colors
public void init() { COM com_Bar,com_Chart,com_Column,com_Items; anytype var_Bar,var_Chart,var_Column,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.SelBackColor(exg2antt1.BackColor()); exg2antt1.SelForeColor(exg2antt1.ForeColor()); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.HistogramVisible(true); com_Chart.HistogramHeight(64); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,128); com_Chart.HistogramView(1300/*exHistogramNoGrouping | exHistogramLeafItems | exHistogramUnlockedItems | exHistogramCheckedItems*/); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.Color(WinApi::RGB2int(128,128,128)); com_Bar.HistogramType(256/*exHistCumulative*/); com_Bar.HistogramItems(6); com_Bar.HistogramRulerLinesColor(WinApi::RGB2int(128,0,0)); com_Bar.HistogramBorderColor(WinApi::RGB2int(1,0,0)); com_Bar.HistogramCumulativeColors(2); com_Bar.HistogramCumulativeColor(0,WinApi::RGB2int(0,0,255)); com_Bar.HistogramCumulativeColor(1,WinApi::RGB2int(0,0,255)); com_Bar.HistogramCumulativeOriginalColorBars(false); com_Bar.HistogramPattern(com_Bar.Pattern()); com_Bar.HistogramCumulativeShowLegend(65535); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Column")); com_Column = var_Column; com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); com_Column.PartialCheck(true); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project 1"); com_Items.AddBar(com_Items.InsertItem(h,,"Item 1"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213))); com_Items.AddBar(com_Items.InsertItem(h,,"Item 2"),"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213))); com_Items.AddBar(com_Items.InsertItem(h,,"Item 3"),"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213))); com_Items.AddBar(com_Items.InsertItem(h,,"Item 4"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213))); com_Items.CellState(com_Items.ItemByIndex(1),COMVariant::createFromInt(0),1); com_Items.ExpandItem(h,true); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,128); } */ |
1380 |
Is it possible to show the non-working pattern over the bars
public void init() { COM com_Bar,com_Bar1,com_Bars,com_Chart,com_Items,com_Level; anytype var_Bar,var_Bar1,var_Bars,var_Chart,var_Items,var_Level; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.NonworkingDaysPattern(6/*exPatternBDiagonal*/); com_Chart.NonworkingDaysColor(WinApi::RGB2int(0,0,0)); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,40); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("6/20/2005",213))); com_Chart.HistogramVisible(true); com_Chart.HistogramHeight(64); com_Chart.HistogramView(2160/*exHistogramBackground | exHistogramAllItems*/); com_Chart.LevelCount(2); var_Bars = com_Chart.Bars(); com_Bars = var_Bars; var_Bar = com_Bars.Add("Empty"); com_Bar = var_Bar; com_Bar.Color(WinApi::RGB2int(0,0,0)); com_Bar.Pattern(5/*exPatternFDiagonal*/); com_Bar.Shape(17/*exShapeSolidFrameless*/); var_Bar1 = com_Bars.Add("Task:Empty"); com_Bar1 = var_Bar1; com_Bar1.Shortcut("Task"); com_Bar1.HistogramItems(-5); com_Bar1.HistogramCriticalValue(3); com_Bar1.HistogramType(0/*exHistOverload*/); com_Bar1.HistogramPattern(com_Bar1.Pattern()); com_Bar1.Def(3/*exBarCaption*/,"<%=%258%> working days bar"); com_Bar1.Def(4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); com_Bar1.Def(20/*exBarKeepWorkingCount*/,COMVariant::createFromBoolean(true)); com_Chart.UnitWidthNonworking(-12); var_Level = COM::createFromObject(com_Chart.Level(1)); com_Level = var_Level; com_Level.FormatLabel("weekday(dvalue) in (0,6) ? `` : value"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task A"),"Task",COMVariant::createFromDate(str2Date("6/23/2005",213)),COMVariant::createFromDate(str2Date("6/29/2005",213)),""); com_Items.AddBar(com_Items.AddItem("Task B"),"Task",COMVariant::createFromDate(str2Date("6/24/2005",213)),COMVariant::createFromDate(str2Date("6/28/2005",213)),""); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,40); } */ |
1379 |
I'm showing values from a ado recordset from sql 2005. When I try to edit a column with integers, it just skips back to the original numbers after pressing enter..., why
// AddItem event - Occurs after a new Item has been inserted to Items collection. void onEvent_AddItem(int _Item) { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(_Item,"Task",com_Items.CellValue(_Item,COMVariant::createFromInt(2)),com_Items.CellValue(_Item,COMVariant::createFromInt(4))); } // Error event - Fired when an internal error occurs. void onEvent_Error(int _Error,str _Description) { ; print( _Error ); print( _Description ); } public void init() { COM com_Chart,com_Column,com_rs; anytype rs,var_Chart,var_Column; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/3/1994",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,256); com_Chart.LevelCount(2); com_Chart.UnitScale(4096/*exDay*/); com_Chart.FirstWeekDay(1/*exMonday*/); com_Chart.OverviewVisible(2/*exOverviewShowAllVisible*/); exg2antt1.ColumnAutoResize(false); exg2antt1.ContinueColumnScroll(false); // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs; rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",1/*adOpenKeyset*/,1/*adLockReadOnly*/); exg2antt1.DataSource(rs); exg2antt1.Items().AllowCellValueToItemBar(true); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(2)); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(4)); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,256); } */ |
1378 |
Is it possible to reduce the non-working parts of the control
public void init() { COM com_Bar,com_Bars,com_Chart,com_Items,com_Level; anytype var_Bar,var_Bars,var_Chart,var_Items,var_Level; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,40); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("6/20/2005",213))); com_Chart.HistogramVisible(true); com_Chart.HistogramHeight(64); com_Chart.HistogramView(112/*exHistogramAllItems*/); com_Chart.LevelCount(2); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar = COM::createFromObject(com_Bars).Item("Task"); com_Bar = var_Bar; com_Bar.HistogramType(1/*exHistOverAllocation*/); com_Bar.HistogramPattern(com_Bar.Pattern()); com_Chart.UnitWidthNonworking(-8); var_Level = COM::createFromObject(com_Chart.Level(1)); com_Level = var_Level; com_Level.FormatLabel("weekday(dvalue) in (0,6) ? `` : value"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task A"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("6/23/2005",213)),COMVariant::createFromDate(str2Date("6/29/2005",213)),"","4 working days bar"); com_Items.ItemBar(h,"",10/*exBarCanResize*/,COMVariant::createFromBoolean(false)); com_Items.ItemBar(h,"",4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); com_Items.ItemBar(h,"",21/*exBarEffort*/,COMVariant::createFromInt(4)); com_Items.ItemBar(h,"",20/*exBarKeepWorkingCount*/,COMVariant::createFromBoolean(true)); h = com_Items.AddItem("Task B"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("6/28/2005",213)),COMVariant::createFromDate(str2Date("6/30/2005",213)),"","2 working days bar"); com_Items.ItemBar(h,"",10/*exBarCanResize*/,COMVariant::createFromBoolean(false)); com_Items.ItemBar(h,"",4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); com_Items.ItemBar(h,"",21/*exBarEffort*/,COMVariant::createFromInt(2)); com_Items.ItemBar(h,"",20/*exBarKeepWorkingCount*/,COMVariant::createFromBoolean(true)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,40); } */ |
1377 |
I don't want to see the "schedule"/show "workload" in non-working days part of the histogram
public void init() { COM com_Bar,com_Bars,com_Chart,com_Items; anytype var_Bar,var_Bars,var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,40); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("6/20/2005",213))); com_Chart.HistogramVisible(true); com_Chart.HistogramHeight(64); com_Chart.HistogramView(112/*exHistogramAllItems*/); com_Chart.LevelCount(2); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar = COM::createFromObject(com_Bars).Item("Task"); com_Bar = var_Bar; com_Bar.HistogramType(1/*exHistOverAllocation*/); com_Bar.HistogramPattern(com_Bar.Pattern()); com_Chart.ShowNonworkingDates(false); com_Chart.ShowNonworkingUnits(false); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task A"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("6/23/2005",213)),COMVariant::createFromDate(str2Date("6/29/2005",213)),"","4 working days bar"); com_Items.ItemBar(h,"",10/*exBarCanResize*/,COMVariant::createFromBoolean(false)); com_Items.ItemBar(h,"",4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); com_Items.ItemBar(h,"",21/*exBarEffort*/,COMVariant::createFromInt(4)); com_Items.ItemBar(h,"",20/*exBarKeepWorkingCount*/,COMVariant::createFromBoolean(true)); h = com_Items.AddItem("Task B"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("6/28/2005",213)),COMVariant::createFromDate(str2Date("6/30/2005",213)),"","2 working days bar"); com_Items.ItemBar(h,"",10/*exBarCanResize*/,COMVariant::createFromBoolean(false)); com_Items.ItemBar(h,"",4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); com_Items.ItemBar(h,"",21/*exBarEffort*/,COMVariant::createFromInt(2)); com_Items.ItemBar(h,"",20/*exBarKeepWorkingCount*/,COMVariant::createFromBoolean(true)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,40); } */ |
1376 |
The control shows, and handles non-working days PERFECT, but how is it possible to reflect this in the Histogram. I don't want to "schedule"/show "workload" in non-working days...
public void init() { COM com_Bar,com_Bars,com_Chart,com_Items; anytype var_Bar,var_Bars,var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,40); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("6/20/2005",213))); com_Chart.HistogramVisible(true); com_Chart.HistogramHeight(64); com_Chart.HistogramView(112/*exHistogramAllItems*/); com_Chart.LevelCount(2); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar = COM::createFromObject(com_Bars).Item("Task"); com_Bar = var_Bar; com_Bar.HistogramType(1/*exHistOverAllocation*/); com_Bar.HistogramPattern(com_Bar.Pattern()); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task A"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("6/23/2005",213)),COMVariant::createFromDate(str2Date("6/29/2005",213)),"","4 working days bar"); com_Items.ItemBar(h,"",10/*exBarCanResize*/,COMVariant::createFromBoolean(false)); com_Items.ItemBar(h,"",4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); com_Items.ItemBar(h,"",21/*exBarEffort*/,COMVariant::createFromInt(4)); com_Items.ItemBar(h,"",20/*exBarKeepWorkingCount*/,COMVariant::createFromBoolean(true)); h = com_Items.AddItem("Task B"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("6/28/2005",213)),COMVariant::createFromDate(str2Date("6/30/2005",213)),"","2 working days bar"); com_Items.ItemBar(h,"",10/*exBarCanResize*/,COMVariant::createFromBoolean(false)); com_Items.ItemBar(h,"",4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); com_Items.ItemBar(h,"",21/*exBarEffort*/,COMVariant::createFromInt(2)); com_Items.ItemBar(h,"",20/*exBarKeepWorkingCount*/,COMVariant::createFromBoolean(true)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,40); } */ |
1375 |
When I do select the button in the overview-zoom I want the scaling to change accordingly. Can I set different scales per selected zoom level
|
1374 |
How do I display Icons instead of text in the overview zoom area
public void init() { COM com_Chart; anytype var_Chart; str var_s; ; super(); var_s = "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql"; var_s = var_s + "Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0"; var_s = var_s + "ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN"; var_s = var_s + "AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="; exg2antt1.Images(COMVariant::createFromStr(var_s)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.OverviewVisible(2/*exOverviewShowAllVisible*/); com_Chart.AllowOverviewZoom(1/*exAlwaysZoom*/); com_Chart.Label(16777216/*exSecond*/,""); com_Chart.Label(0/*exYear*/,""); print( com_Chart.OverviewZoomCaption() ); com_Chart.OverviewZoomCaption("Year|½Year|¼Year|Month|Third|<img>1</img>|Day|Hour|Min|Sec"); } |
1373 |
How do I get it to only display Min, Hour, Day, Week , Month, ie remove Sec and Year in the overview area
public void init() { COM com_Chart; anytype var_Chart; ; super(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.OverviewVisible(2/*exOverviewShowAllVisible*/); com_Chart.AllowOverviewZoom(1/*exAlwaysZoom*/); com_Chart.Label(16777216/*exSecond*/,""); com_Chart.Label(0/*exYear*/,""); } |
1372 |
Is it possible to show quarter hours markers
public void init() { COM com_Chart,com_Level,com_Level1; anytype var_Chart,var_Level,var_Level1; str var_s; ; super(); exg2antt1.BeginUpdate(); exg2antt1.GridLineColor(WinApi::RGB2int(0,0,0)); var_s = "gBFLBCJwBAEHhEJAEGg4BdMIQAAYAQGKIYBkAKBQAGaAoDDUNw5QwAAwjSKkEwsACEIrjKCRShyCYZRhGcTAFBMIhkGoSZKlCIRVDCKYJDbKACSFKkNQ7AabZBgOQJVg"; var_s = var_s + "OKovThKcIybQAASJCKRY7nUIIJA+SoDSRAbqhYIgASnKqLJAkACIJJAaRjHQdJxGKKMQANBghCZseKhWgkKIJUxAdLTWAAMQuaCoZ5icRAca2fJ+XzfeBYDgmAYNQbDc"; var_s = var_s + "JhHCMMwXDaJZBiGJ4dimI4rR7JIDzDJ8cxbEKTZ5meg5boGRZNTrMQA0fQ9MynK6vahfOi7DpuaZnWrcMb2fYNZwrGq0bxoW58BwmP5/XrkNa4XgcVgmAUBA"; exg2antt1.VisualAppearance().Add(3,COMVariant::createFromStr(var_s)); exg2antt1.HeaderHeight(20); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,0); com_Chart.LevelCount(2); com_Chart.UnitScale(65536/*exHour*/); var_Level = com_Chart.Level(0); com_Level = var_Level; com_Level.Alignment(16/*exHOutside*/); com_Level.Label("<%dddd%>, <%mmmm%> <b><%d%></b>, <%yyyy%>"); com_Level.DrawTickLines(2/*exLevelSolidLine*/); var_Level1 = com_Chart.Level(1); com_Level1 = var_Level1; com_Level1.Label("<%hh%>:00"); com_Level1.BackColor(0x3000000); com_Level1.DrawTickLines(2/*exLevelSolidLine*/); com_Chart.DrawLevelSeparator(2/*exLevelSolidLine*/); com_Chart.UnitWidth(64); com_Chart.ResizeUnitScale(1048576/*exMinute*/); com_Chart.ResizeUnitCount(15); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,0); } */ |
1371 |
How can I ensure or always show the labels on the chart part, when scrolling the chart to left or right
|
1370 |
I associate the Start and End columns with bars, but some of them are not shown. What am I doing wrong
public void init() { COM com_Chart,com_Column,com_Column1,com_Items; anytype var_Chart,var_Column,var_Column1,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.MarkSearchColumn(false); exg2antt1.Items().AllowCellValueToItemBar(true); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/25/2000",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Start")); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); com_Column.Def(19/*exCellValueToItemBarKey*/,"K1"); var_Column1 = COM::createFromVariant(exg2antt1.Columns().Add("End")); com_Column1 = var_Column1; com_Column1.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2)); com_Column1.Def(19/*exCellValueToItemBarKey*/,"K1"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem(),"Task",COMVariant::createFromDate(str2Date("1/1/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"K1"); com_Items.AddBar(com_Items.AddItem(),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K1"); com_Items.AddBar(com_Items.AddItem(),"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"????","????"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1369 |
How can I implement OLE Drag and Drop operation
// OLEStartDrag event is not supported. Use the DragEnter,DragLeave,DragOver, DragDrop ... events. public void init() { COM com_Items; anytype var_Items; ; super(); exg2antt1.BeginUpdate(); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); exg2antt1.Columns().Add("Default"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("Item 1"); com_Items.AddItem("Item 2"); com_Items.AddItem("Item 3"); com_Items.AddItem("Item 4"); com_Items.AddItem("Item 5"); exg2antt1.OLEDropMode(1/*exOLEDropManual*/); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1368 |
I can not associate the bar's start and end properties with my start/end columns, only if the bar's key is empty or null. What can I do
// ButtonClick event - Occurs when user clicks on the cell's button. void onEvent_ButtonClick(int _Item,int _ColIndex,COMVariant _Key) { COM com_Column,com_Columns,com_Items; anytype var_Column,var_Columns,var_Items; ; exg2antt1.BeginUpdate(); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; var_Column = COM::createFromObject(com_Columns.Item("Tasks")); com_Column = var_Column; com_Column.Def(19/*exCellValueToItemBarKey*/,"B"); var_Column = COM::createFromObject(com_Columns.Item("Start")); com_Column = var_Column; com_Column.Def(19/*exCellValueToItemBarKey*/,"B"); var_Column = COM::createFromObject(com_Columns.Item("End")); com_Column = var_Column; com_Column.Def(19/*exCellValueToItemBarKey*/,"B"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.CellValue(_Item,COMVariant::createFromInt(1),"B"); com_Items.ItemBar(0,"B",33/*exBarColor*/,COMVariant::createFromInt(0)); com_Items.ItemBar(0,"A",33/*exBarColor*/,COMVariant::createFromInt(16775408)); exg2antt1.EndUpdate(); } public void init() { COM com_Bar,com_Chart,com_Column,com_Column1,com_Column2,com_Columns,com_Editor,com_Items,com_Items1; anytype var_Bar,var_Chart,var_Column,var_Column1,var_Column2,var_Columns,var_Editor,var_Items,var_Items1; int h; ; super(); exg2antt1.BeginUpdate(); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; var_Column = COM::createFromVariant(com_Columns.Add("Tasks")); com_Column = var_Column; com_Column.Width(32); com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(3)); com_Column.Def(19/*exCellValueToItemBarKey*/,"A"); var_Column1 = COM::createFromVariant(com_Columns.Add("Start")); com_Column1 = var_Column1; com_Column1.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); com_Column1.Def(19/*exCellValueToItemBarKey*/,"A"); var_Editor = COM::createFromObject(com_Column1.Editor()); com_Editor = var_Editor; com_Editor.EditType(7/*DateType*/); var_Column2 = COM::createFromVariant(com_Columns.Add("End")); com_Column2 = var_Column2; com_Column2.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2)); com_Column2.Def(19/*exCellValueToItemBarKey*/,"A"); var_Editor = COM::createFromObject(com_Column2.Editor()); com_Editor = var_Editor; com_Editor.EditType(7/*DateType*/); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("9/20/2006",213))); com_Chart.AllowLinkBars(true); com_Chart.AllowCreateBar(0/*exNoCreateBar*/); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,196); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.Pattern(6/*exPatternBDiagonal*/); com_Bar.OverlaidType(515/*exOverlaidBarsStackAutoArrange | exOverlaidBarsStack*/); com_Bar.Overlaid(256/*exOverlaidBarsTransparent*/,COMVariant::createFromInt(80)); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.LockedItemCount(0/*exTop*/,1); h = com_Items.LockedItem(0/*exTop*/,0); com_Items.CellValue(h,COMVariant::createFromInt(0),"Select"); com_Items.CellHasButton(h,COMVariant::createFromInt(0),true); com_Items.CellMerge(h,COMVariant::createFromInt(1),COMVariant::createFromInt(2)); com_Items.CellValue(h,COMVariant::createFromInt(1),"A"); var_Editor = COM::createFromObject(com_Items.CellEditor(h,COMVariant::createFromInt(1))); com_Editor = var_Editor; com_Editor.EditType(1/*EditType*/); var_Items1 = exg2antt1.Items(); com_Items1 = var_Items1; com_Items1.AllowCellValueToItemBar(true); h = com_Items1.AddItem("Task 1"); com_Items1.AddBar(h,"Task",COMVariant::createFromDate(str2Date("9/21/2006",213)),COMVariant::createFromDate(str2Date("9/24/2006",213)),"A","A"); com_Items1.AddBar(h,"Task",COMVariant::createFromDate(str2Date("9/25/2006",213)),COMVariant::createFromDate(str2Date("9/28/2006",213)),"B","B"); com_Items1.ItemBar(h,"B",33/*exBarColor*/,COMVariant::createFromInt(16775408)); h = com_Items1.AddItem("Task 2"); com_Items1.AddBar(h,"Task",COMVariant::createFromDate(str2Date("9/22/2006",213)),COMVariant::createFromDate(str2Date("9/25/2006",213)),"A","A"); com_Items1.AddBar(h,"Task",COMVariant::createFromDate(str2Date("9/26/2006",213)),COMVariant::createFromDate(str2Date("9/29/2006",213)),"B","B"); com_Items1.ItemBar(h,"B",33/*exBarColor*/,COMVariant::createFromInt(16775408)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,196); } */ |
1367 |
How can I determine the order of the events
// AddLink event - Occurs when the user links two bars using the mouse. void onEvent_AddLink(str _LinkKey) { ; print( "AddLink" ); print( _LinkKey ); } // AfterExpandItem event - Fired after an item is expanded (collapsed). void onEvent_AfterExpandItem(int _Item) { ; print( "AfterExpandItem" ); print( _Item ); } // AllowLink event - Notifies at runtime when a link between two bars is possible. void onEvent_AllowLink(int _StartItem,COMVariant _StartBarKey,int _EndItem,COMVariant _EndBarKey,COMVariant /*variant*/ _LinkKey,COMVariant /*bool*/ _Cancel) { ; print( "AllowLink" ); print( _StartItem ); print( _StartBarKey ); print( _EndItem ); print( _EndBarKey ); print( _LinkKey ); } // AnchorClick event - Occurs when an anchor element is clicked. void onEvent_AnchorClick(str _AnchorID,str _Options) { ; print( "AnchorClick" ); print( _AnchorID ); print( _Options ); } // BarParentChange event - Occurs just before moving a bar from current item to another item. void onEvent_BarParentChange(int _Item,COMVariant _Key,int _NewItem,COMVariant /*bool*/ _Cancel) { ; print( "BarParentChange" ); print( _Item ); print( _Key ); print( _NewItem ); } // BarResize event - Occurs when a bar is moved or resized. void onEvent_BarResize(int _Item,COMVariant _Key) { ; print( "BarResize" ); print( _Item ); print( _Key ); } // BarResizing event - Occurs when a bar is moving or resizing. void onEvent_BarResizing(int _Item,COMVariant _Key) { ; print( "BarResizing" ); print( _Item ); print( _Key ); } // BeforeExpandItem event - Fired before an item is about to be expanded (collapsed). void onEvent_BeforeExpandItem(int _Item,COMVariant /*variant*/ _Cancel) { ; print( "BeforeExpandItem" ); print( _Item ); } // ButtonClick event - Occurs when user clicks on the cell's button. void onEvent_ButtonClick(int _Item,int _ColIndex,COMVariant _Key) { ; print( "ButtonClick" ); print( _Item ); print( _ColIndex ); print( _Key ); } // CellImageClick event - Fired after the user clicks on the image's cell area. void onEvent_CellImageClick(int _Item,int _ColIndex) { ; print( "CellImageClick" ); print( _Item ); print( _ColIndex ); } // CellStateChanged event - Fired after cell's state has been changed. void onEvent_CellStateChanged(int _Item,int _ColIndex) { ; print( "CellStateChanged" ); print( _Item ); print( _ColIndex ); } // Change event - Occurs when the user changes the cell's content. void onEvent_Change(int _Item,int _ColIndex,COMVariant /*variant*/ _NewValue) { ; print( "Change" ); print( _Item ); print( _ColIndex ); print( _NewValue ); } // ChartEndChanging event - Occurs after the chart has been changed. void onEvent_ChartEndChanging(int _Operation) { ; print( "ChartEndChanging" ); print( _Operation ); } // ChartSelectionChanged event - Occurs when the user selects objects in the chart area. void onEvent_ChartSelectionChanged() { ; print( "ChartSelectionChanged" ); } // ChartStartChanging event - Occurs when the chart is about to be changed. void onEvent_ChartStartChanging(int _Operation) { ; print( "ChartStartChanging" ); print( _Operation ); } // Click event - Occurs when the user presses and then releases the left mouse button over the tree control. void onEvent_Click() { ; print( "Click" ); } // ColumnClick event - Fired after the user clicks on column's header. void onEvent_ColumnClick(COM _Column) { ; print( "ColumnClick" ); } // CreateBar event - Fired when the user creates a new bar. void onEvent_CreateBar(int _Item,date _DateStart,date _DateEnd) { ; print( "CreateBar" ); print( _Item ); print( _DateStart ); print( _DateEnd ); } // DateChange event - Occurs when the first visible date is changed. void onEvent_DateChange() { ; print( "DateChange" ); } // DblClick event - Occurs when the user dblclk the left mouse button over an object. void onEvent_DblClick(int _Shift,int _X,int _Y) { ; print( "DblClick" ); print( _Shift ); print( _X ); print( _Y ); exg2antt1.Edit(); } // Edit event - Occurs just before editing the focused cell. void onEvent_Edit(int _Item,int _ColIndex,COMVariant /*bool*/ _Cancel) { ; print( "Edit" ); print( _Item ); print( _ColIndex ); } // EditClose event - Occurs when the edit operation ends. void onEvent_EditClose() { ; print( "EditClose" ); } // EditOpen event - Occurs when the edit operation starts. void onEvent_EditOpen() { ; print( "EditOpen" ); } // FilterChange event - Occurs when the filter was changed. void onEvent_FilterChange() { ; print( "FilterChange" ); } // FilterChanging event - Notifies your application that the filter is about to change. void onEvent_FilterChanging() { ; print( "FilterChanging" ); } // FocusChanged event - Occurs when a cell gets the focus. void onEvent_FocusChanged() { ; print( "FocusChanged" ); } // InsideZoom event - Notifies your application that a date is about to be magnified. void onEvent_InsideZoom(date _DateTime) { ; print( "InsideZoom" ); print( _DateTime ); } // KeyDown event - Occurs when the user presses a key while an object has the focus. void onEvent_KeyDown(COMVariant /*short*/ _KeyCode,int _Shift) { ; print( "KeyDown" ); print( _KeyCode ); print( _Shift ); } // KeyPress event - Occurs when the user presses and releases an ANSI key. void onEvent_KeyPress(COMVariant /*short*/ _KeyAscii) { ; print( "KeyPress" ); print( _KeyAscii ); } // KeyUp event - Occurs when the user releases a key while an object has the focus. void onEvent_KeyUp(COMVariant /*short*/ _KeyCode,int _Shift) { ; print( "KeyUp" ); print( _KeyCode ); print( _Shift ); } // LayoutChanged event - Occurs when column's position or column's size is changed. void onEvent_LayoutChanged() { ; print( "LayoutChanged" ); } // MouseDown event - Occurs when the user presses a mouse button. void onEvent_MouseDown(int _Button,int _Shift,int _X,int _Y) { ; print( "MouseDown" ); print( _Button ); print( _Shift ); print( _X ); print( _Y ); } // MouseMove event - Occurs when the user moves the mouse. void onEvent_MouseMove(int _Button,int _Shift,int _X,int _Y) { ; } // MouseUp event - Occurs when the user releases a mouse button. void onEvent_MouseUp(int _Button,int _Shift,int _X,int _Y) { ; print( "MouseUp" ); print( _Button ); print( _Shift ); print( _X ); print( _Y ); } // OffsetChanged event - Occurs when the scroll position has been changed. void onEvent_OffsetChanged(boolean _Horizontal,int _NewVal) { ; print( "OffsetChanged" ); print( _Horizontal ); print( _NewVal ); } // OversizeChanged event - Occurs when the right range of the scroll has been changed. void onEvent_OversizeChanged(boolean _Horizontal,int _NewVal) { ; print( "OversizeChanged" ); print( _Horizontal ); print( _NewVal ); } // OverviewZoom event - Occurs once the user selects a new time scale unit in the overview zoom area. void onEvent_OverviewZoom() { ; print( "OverviewZoom" ); } // RClick event - Fired when right mouse button is clicked void onEvent_RClick() { ; print( "RClick" ); } // ScrollButtonClick event - Occurs when the user clicks a button in the scrollbar. void onEvent_ScrollButtonClick(int _ScrollBar,int _ScrollPart) { ; print( "ScrollButtonClick" ); print( _ScrollBar ); print( _ScrollPart ); } // SelectionChanged event - Fired after a new item has been selected. void onEvent_SelectionChanged() { ; print( "SelectionChanged" ); } // Sort event - Fired when the control sorts a column. void onEvent_Sort() { ; print( "Sort" ); } public void init() { COM com_Bar,com_Chart,com_Column,com_Column1,com_Columns,com_Editor,com_Items,com_Level; anytype var_Bar,var_Chart,var_Column,var_Column1,var_Columns,var_Editor,var_Items,var_Level; int h; str var_s; ; super(); exg2antt1.BeginUpdate(); var_s = "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql"; var_s = var_s + "Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0"; var_s = var_s + "ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN"; var_s = var_s + "AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="; exg2antt1.Images(COMVariant::createFromStr(var_s)); exg2antt1.DrawGridLines(-1/*exAllLines*/); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); exg2antt1.GridLineStyle(4/*exGridLinesHDash*/); exg2antt1.AutoEdit(false); exg2antt1.ExpandOnDblClick(false); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.AllowInsideZoom(true); com_Chart.OverviewVisible(2/*exOverviewShowAllVisible*/); com_Chart.AllowOverviewZoom(1/*exAlwaysZoom*/); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,128); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.DrawGridLines(-1/*exAllLines*/); com_Chart.GridLineStyle(36/*exGridLinesVSolid | exGridLinesHDash*/); com_Chart.LevelCount(2); var_Level = COM::createFromObject(com_Chart.Level(0)); com_Level = var_Level; com_Level.DrawGridLines(true); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.Pattern(1/*exPatternSolid*/); com_Chart.UnitScale(4096/*exDay*/); com_Chart.Label(16777216/*exSecond*/,""); com_Chart.Label(1048576/*exMinute*/,""); com_Chart.Label(65536/*exHour*/,""); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; var_Column = COM::createFromVariant(com_Columns.Add("Column")); com_Column = var_Column; com_Column.DisplayFilterButton(true); com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); var_Editor = COM::createFromObject(com_Column.Editor()); com_Editor = var_Editor; com_Editor.EditType(1/*EditType*/); var_Column1 = COM::createFromVariant(com_Columns.Add("Button")); com_Column1 = var_Column1; com_Column1.AllowSizing(false); com_Column1.Width(18); com_Column1.Def(2/*exCellHasButton*/,COMVariant::createFromBoolean(true)); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("parent"); com_Items.CellImage(h,COMVariant::createFromInt(0),1); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"A","<a>A</a>"); com_Items.ItemBar(h,"A",4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); com_Items.ItemBar(h,"A",28/*exBarCanMoveToAnother*/,COMVariant::createFromBoolean(true)); com_Items.ItemBar(h,"A",6/*exBarToolTip*/,"This is a bit of text that should be shown when cursor hovers the bar"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/15/2001",213)),"B","<a>B</a>"); com_Items.ItemBar(h,"B",4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); com_Items.ItemBar(h,"B",28/*exBarCanMoveToAnother*/,COMVariant::createFromBoolean(true)); com_Items.InsertItem(h,"","child"); com_Items.ExpandItem(h,true); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,128); } */ |
1366 |
How can I change the chart's horizontal grid lines
public void init() { COM com_Bar,com_Chart,com_Items,com_Level; anytype var_Bar,var_Chart,var_Items,var_Level; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DrawGridLines(-1/*exAllLines*/); exg2antt1.GridLineStyle(4/*exGridLinesHDash*/); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,48); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.DrawGridLines(-1/*exAllLines*/); com_Chart.GridLineStyle(36/*exGridLinesVSolid | exGridLinesHDash*/); com_Chart.LevelCount(2); var_Level = COM::createFromObject(com_Chart.Level(0)); com_Level = var_Level; com_Level.DrawGridLines(true); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.Pattern(1/*exPatternSolid*/); exg2antt1.Columns().Add("Column"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Item 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"A"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/15/2001",213)),"B"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,48); } */ |
1365 |
Is there any way to determine whether the ADO operations fails
|
1364 |
Is it possible to select a column instead sorting it
// ColumnClick event - Fired after the user clicks on column's header. void onEvent_ColumnClick(COM _Column) { // Column.Selected = True COM com_Column; anytype var_Column; ; exg2antt1.BeginUpdate(); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(0)); com_Column = var_Column; com_Column.Selected(false); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(1)); com_Column = var_Column; com_Column.Selected(false); exg2antt1.Items().SelectAll(); exg2antt1.EndUpdate(); } public void init() { COM com_Column,com_Columns,com_Items; anytype var_Column,var_Columns,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.MarkSearchColumn(false); exg2antt1.ShowFocusRect(false); exg2antt1.SingleSel(false); exg2antt1.FullRowSelect(1/*exRectSel*/); exg2antt1.SortOnClick(0/*exNoSort*/); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("Column1"); com_Columns.Add("Column2"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.CellValue(com_Items.AddItem("One"),COMVariant::createFromInt(1),"Three"); com_Items.CellValue(com_Items.AddItem("Two"),COMVariant::createFromInt(1),"Four"); com_Items.SelectAll(); exg2antt1.EndUpdate(); } |
1363 |
I am using the exRectSel, and clicking the first column, has no effect, instead if I click other it works as it should
public void init() { COM com_Columns,com_Items; anytype var_Columns,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.SearchColumnIndex(-1); exg2antt1.FullRowSelect(1/*exRectSel*/); exg2antt1.ShowFocusRect(false); exg2antt1.MarkSearchColumn(false); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("Column1"); com_Columns.Add("Column2"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.CellValue(com_Items.AddItem(COMVariant::createFromInt(1)),COMVariant::createFromInt(1),COMVariant::createFromInt(2)); com_Items.CellValue(com_Items.AddItem(COMVariant::createFromInt(3)),COMVariant::createFromInt(1),COMVariant::createFromInt(4)); com_Items.CellValue(com_Items.AddItem(COMVariant::createFromInt(5)),COMVariant::createFromInt(1),COMVariant::createFromInt(6)); exg2antt1.EndUpdate(); } |
1362 |
Is it possible to display empty strings for 0 values
public void init() { COM com_Column,com_Editor,com_Items; anytype var_Column,var_Editor,var_Items; ; super(); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Currency")); com_Column = var_Column; com_Column.FormatColumn("dbl(value) ? currency(dbl(value)) : ``"); var_Editor = com_Column.Editor(); com_Editor = var_Editor; com_Editor.EditType(1/*EditType*/); com_Editor.Numeric(1/*exFloat*/); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(COMVariant::createFromReal(1.23)); com_Items.AddItem(COMVariant::createFromReal(2.34)); com_Items.AddItem(COMVariant::createFromInt(0)); com_Items.AddItem(COMVariant::createFromReal(10000.99)); } |
1361 |
Is it possible to display empty strings for 0 values
public void init() { COM com_Items; anytype var_Items; ; super(); exg2antt1.Columns().Add("Number"); COM::createFromVariant(exg2antt1.Columns().Add("Currency")).ComputedField("%0 ? currency(%0) : ``"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(COMVariant::createFromReal(1.23)); com_Items.AddItem(COMVariant::createFromReal(2.34)); com_Items.AddItem(COMVariant::createFromInt(0)); com_Items.AddItem(COMVariant::createFromReal(10000.99)); } |
1360 |
How can I hide a date from the chart view, when I display hours instead days
public void init() { COM com_Chart,com_InsideZoomFormat,com_InsideZooms,com_InsideZooms1,com_Level,com_Level1; anytype var_Chart,var_InsideZoomFormat,var_InsideZooms,var_InsideZooms1,var_Level,var_Level1; str var_s; ; super(); exg2antt1.BeginUpdate(); exg2antt1.HeaderHeight(32); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("6/8/2011",213))); com_Chart.AdjustLevelsToBase(true); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,0); com_Chart.LevelCount(2); com_Chart.AllowInsideZoom(true); var_Level = com_Chart.Level(0); com_Level = var_Level; com_Level.Alignment(1/*CenterAlignment*/); com_Level.Label("<b><%d%>-<%mmm%>-<%yyyy%>"); com_Level.Unit(4096/*exDay*/); var_Level1 = com_Chart.Level(1); com_Level1 = var_Level1; com_Level1.Label("<%h%>"); com_Level1.Count(8); com_Level1.Unit(65536/*exHour*/); var_s = "date(int(dvalue)) case (#06/08/2011# : (int(value) case ( 0 : 'Shift <b>1</b><br>23/20'; 8 : 'Shift <b>2</b><br>38/30' ; 16 : 'S"; var_s = var_s + "hift <b>3</b><br>24/24' ) ) ; #06/09/2011# : (int(value) case ( 0 : 'Shift <b>1</b><br>15/20'; 8 : 'Shift <b>2</b><br>30/32' ; 1"; var_s = var_s + "6 : 'Shift <b>3</b><br>26/24' ) ) )"; com_Level1.FormatLabel(var_s); com_Chart.UnitWidth(64); com_Chart.NonworkingDays(0); com_Chart.AllowInsideZoom(true); var_InsideZoomFormat = COM::createFromObject(com_Chart.DefaultInsideZoomFormat()); com_InsideZoomFormat = var_InsideZoomFormat; com_InsideZoomFormat.InsideUnit(1048576/*exMinute*/); com_Chart.AllowResizeInsideZoom(false); com_Chart.InsideZoomOnDblClick(false); var_InsideZooms = com_Chart.InsideZooms(); com_InsideZooms = var_InsideZooms; com_InsideZooms.SplitBaseLevel(false); com_InsideZooms.DefaultWidth(0); var_InsideZooms1 = com_Chart.InsideZooms(); com_InsideZooms1 = var_InsideZooms1; com_InsideZooms1.Add(COMVariant::createFromUtcDateTime(str2Datetime("6/9/2011 8:00:00",213))); com_InsideZooms1.Add(COMVariant::createFromUtcDateTime(str2Datetime("6/9/2011 16:00:00",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,0); } */ |
1359 |
I’ve created a skin (EBN) for the bars of my chart, with rounded top corners. The problem, is that these rounded corners are applied also at beginning and the end of the non working units. Is it possible to show a different picture/skin for the non-working part of the bars
public void init() { COM com_Bar,com_Bars,com_Items; anytype var_Bar,var_Bars,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.VisualAppearance().Add(1,"c:\\exontrol\\images\\normal.ebn"); exg2antt1.VisualAppearance().Add(2,"c:\\exontrol\\images\\pushed.ebn"); exg2antt1.Columns().Add("Task"); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(false,128); var_Bars = exg2antt1.Chart().Bars(); com_Bars = var_Bars; var_Bar = COM::createFromObject(com_Bars.Item("Task")); com_Bar = var_Bar; com_Bar.Color(0x1000000); var_Bar = COM::createFromObject(com_Bars.Item("Split")); com_Bar = var_Bar; com_Bar.Color(0x2000000); var_Bar = COM::createFromObject(com_Bars.Add("Task:Split")); com_Bar = var_Bar; com_Bar.Shortcut("TS"); exg2antt1.Chart().FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task"),"TS",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/16/2001",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1358 |
How do I display the names of the tasks on bars but not in the middle of the bar (left or right)
public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("12/27/2000",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.Pattern(2/*exPatternDot*/); com_Bar.Height(15); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Task 1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"K1","<b>to do</b> "); com_Items.ItemBar(h,"K1",4/*exBarHAlignCaption*/,COMVariant::createFromInt(2)); h = com_Items.AddItem("Task 2"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"K2","<b>to do</b>"); com_Items.ItemBar(h,"K2",4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); h = com_Items.AddItem("Task 3"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"K1"," <b>to do</b>"); com_Items.ItemBar(h,"K1",4/*exBarHAlignCaption*/,COMVariant::createFromInt(0)); h = com_Items.AddItem("Task 4"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"K2","<b>to do</b>"); com_Items.ItemBar(h,"K2",4/*exBarHAlignCaption*/,COMVariant::createFromInt(16)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1357 |
How can I get the list of items as they are displayed
public void init() { COM com_Column,com_Items; anytype var_Column,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.BackColorAlternate(WinApi::RGB2int(240,240,240)); exg2antt1.Columns().Add("Names"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("Mantel"); com_Items.AddItem("Mechanik"); com_Items.AddItem("Motor"); com_Items.AddItem("Murks"); com_Items.AddItem("Märchen"); com_Items.AddItem("Möhren"); com_Items.AddItem("Mühle"); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(0)); com_Column = var_Column; com_Column.SortOrder(1/*SortAscending*/); exg2antt1.EndUpdate(); print( exg2antt1.GetItems(COMVariant::createFromInt(1)) ); } |
1356 |
How can I disable the left and right arrows to move to next cell while editing
public void init() { COM com_Editor,com_Items; anytype var_Editor,var_Items; ; super(); var_Editor = COM::createFromVariant(exg2antt1.Columns().Add("Edit")).Editor(); com_Editor = var_Editor; com_Editor.EditType(1/*EditType*/); com_Editor.Option(20/*exLeftArrow*/,COMVariant::createFromInt(0)); com_Editor.Option(21/*exRightArrow*/,COMVariant::createFromInt(0)); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("Cell 1"); com_Items.AddItem("Cell 2"); com_Items.AddItem("Cell 3"); } |
1355 |
Is it possible to define a bar that is treated as a non-working hour so user can move it at runtime
public void init() { COM com_Bar,com_Bars,com_Chart,com_Items,com_Level; anytype var_Bar,var_Bars,var_Chart,var_Items,var_Level; int h; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.AllowNonworkingBars(true); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar = COM::createFromObject(com_Bars).Add("Task:Split"); com_Bar = var_Bar; com_Bar.Shortcut("Task"); com_Chart.UnitScale(65536/*exHour*/); var_Level = COM::createFromObject(com_Chart.Level(1)); com_Level = var_Level; com_Level.Label("<font ;4><%hh%>"); com_Chart.UnitWidth(12); com_Chart.NonworkingDaysPattern(6/*exPatternBDiagonal*/); com_Chart.NonworkingDays(0); exg2antt1.Columns().Add("Tasks"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Machine"); com_Items.ItemNonworkingUnits(h,COMVariant::createFromBoolean(false),"0"); com_Items.AddBar(h,"",COMVariant::createFromUtcDateTime(str2Datetime("1/1/2001 9:00:00",213)),COMVariant::createFromUtcDateTime(str2Datetime("1/1/2001 11:00:00",213)),"A","pause"); com_Items.ItemBar(h,"A",38/*exBarTreatAsNonworking*/,COMVariant::createFromBoolean(true)); com_Items.AddBar(h,"Task",COMVariant::createFromUtcDateTime(str2Datetime("1/1/2001 12:00:00",213)),COMVariant::createFromUtcDateTime(str2Datetime("1/1/2001 17:00:00",213)),"Z"); com_Items.ItemBar(h,"Z",20/*exBarKeepWorkingCount*/,COMVariant::createFromBoolean(true)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1354 |
Is it possible to customize the chart's header so I can display shift and other values
|
1353 |
How can I change both start and end dates of the bar
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Tasks"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,64); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("6/19/2005",213))); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Test"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("6/22/2005",213)),COMVariant::createFromDate(str2Date("6/27/2005",213)),"t1"); com_Items.AddBar(h,com_Items.ItemBar(h,"t1",0/*exBarName*/),COMVariant::createFromDate(str2Date("6/21/2005",213)),COMVariant::createFromDate(str2Date("6/22/2005",213)),"t1"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,64); } */ |
1352 |
Is it possible to add new rows, as I type like in Excel
// EditClose event - Occurs when the edit operation ends. void onEvent_EditClose() { ; exg2antt1.Items().AddItem(""); } public void init() { COM com_Editor; anytype var_Editor; ; super(); exg2antt1.BeginUpdate(); exg2antt1.AutoEdit(true); var_Editor = COM::createFromObject(COM::createFromVariant(exg2antt1.Columns().Add("Default"))).Editor(); com_Editor = var_Editor; com_Editor.EditType(1/*EditType*/); exg2antt1.FullRowSelect(0/*exColumnSel*/); exg2antt1.Items().AddItem(""); exg2antt1.DrawGridLines(-1/*exAllLines*/); exg2antt1.ScrollBars(15/*exDisableBoth*/); exg2antt1.EndUpdate(); } |
1351 |
How do I load bars from my table/database
// AddItem event - Occurs after a new Item has been inserted to Items collection. void onEvent_AddItem(int _Item) { COM com_Items; anytype var_Items; ; var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(_Item,"Task",com_Items.CellValue(_Item,COMVariant::createFromInt(2)),com_Items.CellValue(_Item,COMVariant::createFromInt(4))); } public void init() { COM com_Chart,com_Column,com_Items,com_rs; anytype rs,var_Chart,var_Column,var_Items; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("8/3/1994",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,256); com_Chart.LevelCount(2); com_Chart.UnitScale(4096/*exDay*/); com_Chart.FirstWeekDay(1/*exMonday*/); com_Chart.OverviewVisible(2/*exOverviewShowAllVisible*/); exg2antt1.ColumnAutoResize(false); exg2antt1.ContinueColumnScroll(false); // Add 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' reference to your project. rs = COM::createFromObject(new ADODB.Recordset()); com_rs = rs; rs.Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Program Files\\Exontrol\\ExG2antt\\Sample\\Access\\misc.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/); exg2antt1.DataSource(rs); exg2antt1.Items().AllowCellValueToItemBar(true); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(2)); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(4)); com_Column = var_Column; com_Column.Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,256); } */ |
1350 |
Is posible to reduce the size of the picture to be shown in the bar's caption
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.HTMLPicture("pic1","c:\\exontrol\\images\\zipdisk.gif"); exg2antt1.Columns().Add("Task"); exg2antt1.ScrollBySingleLine(true); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,78); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Default-Size"); com_Items.ItemHeight(h,48); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K1","<img>pic1</img>"); h = com_Items.AddItem("Custom-Size"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K2","<img>pic1:18</img>"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,78); } */ |
1349 |
Is posible to reduce the size of the picture to be shown in the column's caption
public void init() { ; super(); exg2antt1.BeginUpdate(); exg2antt1.HTMLPicture("pic1","c:\\exontrol\\images\\zipdisk.gif"); exg2antt1.HeaderHeight(48); COM::createFromVariant(exg2antt1.Columns().Add("DefaultSize")).HTMLCaption("Default-Size <img>pic1</img> Picture"); COM::createFromVariant(exg2antt1.Columns().Add("CustomSize")).HTMLCaption("Custom-Size <img>pic1:16</img> Picture"); exg2antt1.EndUpdate(); } |
1348 |
Is it possible to display the selected dates using a solid color instead vertical lines
|
1347 |
How can I show the cells using a different background color based on the condition I have
public void init() { COM com_Columns,com_ConditionalFormat,com_ConditionalFormat1,com_ConditionalFormat2,com_ConditionalFormats,com_Items; anytype var_Columns,var_ConditionalFormat,var_ConditionalFormat1,var_ConditionalFormat2,var_ConditionalFormats,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.SelBackMode(1/*exTransparent*/); exg2antt1.ShowFocusRect(false); var_ConditionalFormats = exg2antt1.ConditionalFormats(); com_ConditionalFormats = var_ConditionalFormats; var_ConditionalFormat = com_ConditionalFormats.Add("dbl(%1)-dbl(%0) = 1"); com_ConditionalFormat = var_ConditionalFormat; com_ConditionalFormat.BackColor(WinApi::RGB2int(255,0,0)); com_ConditionalFormat.ApplyTo(1); var_ConditionalFormat1 = com_ConditionalFormats.Add("dbl(%0)-dbl(%1) = 3"); com_ConditionalFormat1 = var_ConditionalFormat1; com_ConditionalFormat1.BackColor(WinApi::RGB2int(255,255,0)); com_ConditionalFormat1.ApplyTo(0/*exFormatToColumns*/); var_ConditionalFormat2 = com_ConditionalFormats.Add("dbl(%1)-dbl(%0) = 4"); com_ConditionalFormat2 = var_ConditionalFormat2; com_ConditionalFormat2.ForeColor(WinApi::RGB2int(128,128,128)); com_ConditionalFormat2.Bold(true); com_ConditionalFormat2.ApplyTo(-1/*exFormatToItems*/); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; COM::createFromVariant(com_Columns.Add("C1")).Width(8); COM::createFromVariant(com_Columns.Add("C2")).Width(8); com_Columns.Add(""); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.CellValue(com_Items.AddItem(COMVariant::createFromInt(2)),COMVariant::createFromInt(1),COMVariant::createFromInt(3)); com_Items.CellValue(com_Items.AddItem(COMVariant::createFromInt(5)),COMVariant::createFromInt(1),COMVariant::createFromInt(2)); com_Items.CellValue(com_Items.AddItem(COMVariant::createFromInt(5)),COMVariant::createFromInt(1),COMVariant::createFromInt(6)); com_Items.CellValue(com_Items.AddItem(COMVariant::createFromInt(2)),COMVariant::createFromInt(1),COMVariant::createFromInt(6)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1346 |
How can I specify the frame's color for all Task bars
public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.Def(51/*exBarFrameColor*/,COMVariant::createFromInt(255)); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task 1"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"K1"); com_Items.AddBar(com_Items.AddItem("Task 2"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"K2"); com_Items.AddBar(com_Items.AddItem("Task 3"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"K3"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1345 |
Is it possible to change the bar's frame color
public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DefaultItemHeight(25); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); com_Chart.DrawGridLines(1/*exHLines*/); com_Chart.NonworkingDays(0); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.Height(15); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Default"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"K1"); h = com_Items.AddItem("Red-Frame"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K1"); com_Items.ItemBar(h,"K1",51/*exBarFrameColor*/,COMVariant::createFromInt(255)); h = com_Items.AddItem("Green-ThickFrame"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"K1"); com_Items.ItemBar(h,"K1",42/*exBarPattern*/,COMVariant::createFromInt(4099)); com_Items.ItemBar(h,"K1",51/*exBarFrameColor*/,COMVariant::createFromInt(32768)); h = com_Items.AddItem("Red-ThickFrame/Shadow"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"K1"); com_Items.ItemBar(h,"K1",42/*exBarPattern*/,COMVariant::createFromInt(12291)); com_Items.ItemBar(h,"K1",51/*exBarFrameColor*/,COMVariant::createFromInt(255)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1344 |
I need to customize the labels on the chart. Is it possible
|
1343 |
Is it possible to show a frame around the bar
public void init() { COM com_Appearance,com_Chart,com_Items; anytype var_Appearance,var_Chart,var_Items; int h; str var_s; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DefaultItemHeight(25); var_Appearance = exg2antt1.VisualAppearance(); com_Appearance = var_Appearance; var_s = "gBFLBCJwBAEHhEJAEGg4BOUMQAAYAQGKIYBkAKBQAGaAoDDYMgzQwAAxDELMEwsACEIrjKCVIgkHYJRjGEZxMAsEwjAoaQChEZRUhEMgxDDIIyAJIcaw0GSEZwgOQZBi"; var_s = var_s + "OEYnDANkIYJDSIYHTZIUzTJAdGSVJKNKAoKCaEgORo5SpNUghBDYKQTJyeagkaaRVCWLplRCNIwWNJdVwjEaQaaiarKNqKNpSViAEqSdKEZRLOyRZyiKQMEreY4EUDQc"; var_s = var_s + "xUPYMNYaAC6AAparpbwCFpSYpRND3TaEE4jSLKAA0HD6QqebIDDJaFq6PbVXSTOLPNhgPQcWxeVJBXjLExUALGSYLC6nKayHZcHACKK5VbVW6ZZDdNy/BLQeD4QANG4r"; var_s = var_s + "iuNJriMV4dgWVgHh+ZpgCeEIQEQJIgGkMYdA6JwjC0VAAmaJgQgmPp4lCWgSCiaB+DKIYIjqQpllMf6JgYAoAmASAWAaAZggQDJ/gKYJIDYDoDmECBGAOBBhEgVgUgSY"; var_s = var_s + "RoGYGYGCGKB2BCBwhmiBgLggIgoHoJIJGGKIeCiBYiiiLgXgCIpohoMIMGKGJODSCwghiZg6g6Y5InYPh/lAECAg"; com_Appearance.Add(1,COMVariant::createFromStr(var_s)); com_Appearance.Add(2,"CP:1 2 2 -2 -2"); com_Appearance.Add(3,"CP:1 -5 -5 5 5"); com_Appearance.Add(4,"XP:Window 19 1"); com_Appearance.Add(5,"XP:TreeView 2 1"); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,128); com_Chart.DrawGridLines(1/*exHLines*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Default"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"K1"); h = com_Items.AddItem("Red-Frame"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K1"); com_Items.ItemBar(h,"K1",51/*exBarFrameColor*/,COMVariant::createFromInt(255)); h = com_Items.AddItem("Green-ThickFrame"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"K1"); com_Items.ItemBar(h,"K1",42/*exBarPattern*/,COMVariant::createFromInt(4099)); com_Items.ItemBar(h,"K1",51/*exBarFrameColor*/,COMVariant::createFromInt(32768)); h = com_Items.AddItem("Red-ThickFrame/Shadow"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/7/2001",213)),"K1"); com_Items.ItemBar(h,"K1",42/*exBarPattern*/,COMVariant::createFromInt(12291)); com_Items.ItemBar(h,"K1",51/*exBarFrameColor*/,COMVariant::createFromInt(255)); h = com_Items.AddItem("EBN-Frame-Border"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/9/2001",213)),"K2"); com_Items.ItemBar(h,"K2",51/*exBarFrameColor*/,COMVariant::createFromInt(16777216)); h = com_Items.AddItem("EBN-Inside Frame"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/9/2001",213)),COMVariant::createFromDate(str2Date("1/13/2001",213)),"K3"); com_Items.ItemBar(h,"K3",51/*exBarFrameColor*/,COMVariant::createFromInt(33554432)); h = com_Items.AddItem("EBN-Outside Frame"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/15/2001",213)),COMVariant::createFromDate(str2Date("1/18/2001",213)),"K4"); com_Items.ItemBar(h,"K4",51/*exBarFrameColor*/,COMVariant::createFromInt(50331648)); h = com_Items.AddItem("EBN-XP Close Button"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/15/2001",213)),COMVariant::createFromDate(str2Date("1/18/2001",213)),"K5"); com_Items.ItemBar(h,"K5",51/*exBarFrameColor*/,COMVariant::createFromInt(67108864)); h = com_Items.AddItem("EBN-XP TreeView Glyph"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/15/2001",213)),COMVariant::createFromDate(str2Date("1/18/2001",213)),"K6"); com_Items.ItemBar(h,"K6",51/*exBarFrameColor*/,COMVariant::createFromInt(83886080)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,128); } */ |
1342 |
Currently your control, provides customization up to Year,Month,Day,Hours,etc. I would like to add Shifts in a day. Shortly, I need to customize the chart's header. Is it possible
public void init() { COM com_Chart,com_Level,com_Level1; anytype var_Chart,var_Level,var_Level1; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("7/1/2011",213))); com_Chart.AdjustLevelsToBase(true); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,0); com_Chart.LevelCount(2); var_Level = com_Chart.Level(0); com_Level = var_Level; com_Level.Alignment(1/*CenterAlignment*/); com_Level.Label("<b><%d%> - <%mmmm%> - <%yyyy%>"); com_Level.Unit(4096/*exDay*/); var_Level1 = com_Chart.Level(1); com_Level1 = var_Level1; com_Level1.Label("<%h%>"); com_Level1.Count(8); com_Level1.Unit(65536/*exHour*/); com_Level1.ReplaceLabel(0," Shift 1"); com_Level1.ReplaceLabel(8," Shift 2"); com_Level1.ReplaceLabel(16," Shift 3"); com_Chart.UnitWidth(48); com_Chart.NonworkingDays(0); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,0); } */ |
1341 |
The exbartootip shows dates after you moved or resized the bar. My question is during the move or resizing of bar(you click on bar and drag it,during that time) , can we display the new dates simultaneously so we will know where we want to move or resize the bar to
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h; ; super(); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,64); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); com_Chart.DrawDateTicker(true); com_Chart.DateTickerLabel("<%mmm%> <%d%><br><b><%yyyy%>"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Tasks A"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/9/2001",213)),"K2"); com_Items.SelectableItem(com_Items.AddItem(),false); h = com_Items.AddItem("Tasks B"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"K1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/11/2001",213)),"K2"); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,64); } */ |
1340 |
Is it possible to assign a tooltip automatically to all bars, so it can display the start and end, without specifying the IexBarToolTip for each bar
public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; int h; ; super(); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,64); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.Def(6/*exBarToolTip*/,"<b><%=%9 + '/' + %C0%></b><br><upline><dotline>Start: <%=%1%><br>End: <%=%2%><br>Duration: <%=(%2-%1)%><br>Working: <%=%258%>"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Tasks A"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"K1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/5/2001",213)),COMVariant::createFromDate(str2Date("1/9/2001",213)),"K2"); h = com_Items.AddItem("Tasks B"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/3/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"K1"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/11/2001",213)),"K2"); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,64); } */ |
1339 |
How can I change the color, font, bold etc for the items/cells in the same column or for the entire column
public void init() { COM com_Column,com_ConditionalFormat,com_Items; anytype var_Column,var_ConditionalFormat,var_Items; ; super(); exg2antt1.BeginUpdate(); var_ConditionalFormat = COM::createFromObject(exg2antt1.ConditionalFormats()).Add("1"); com_ConditionalFormat = var_ConditionalFormat; com_ConditionalFormat.Bold(true); com_ConditionalFormat.ForeColor(WinApi::RGB2int(255,0,0)); com_ConditionalFormat.ApplyTo(1); exg2antt1.Columns().Add("C1"); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("C2")); com_Column = var_Column; com_Column.HeaderBold(true); com_Column.HTMLCaption("<fgcolor=FF0000>C2"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.CellValue(com_Items.AddItem(COMVariant::createFromInt(10)),COMVariant::createFromInt(1),COMVariant::createFromInt(11)); com_Items.CellValue(com_Items.AddItem(COMVariant::createFromInt(12)),COMVariant::createFromInt(1),COMVariant::createFromInt(13)); exg2antt1.EndUpdate(); } |
1338 |
How can I remove a date-time zone
|
1337 |
How can I filter the check-boxes (method 2)
public void init() { COM com_Column,com_Editor,com_Items; anytype var_Column,var_Editor,var_Items; ; super(); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Check")); com_Column = var_Column; var_Editor = com_Column.Editor(); com_Editor = var_Editor; com_Editor.EditType(19/*CheckValueType*/); com_Editor.Option(17/*exCheckValue2*/,COMVariant::createFromInt(1)); com_Column.DisplayFilterButton(true); com_Column.DisplayFilterPattern(false); com_Column.CustomFilter("checked||-1|||unchecked||0"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(COMVariant::createFromBoolean(true)); com_Items.AddItem(COMVariant::createFromBoolean(true)); com_Items.AddItem(COMVariant::createFromBoolean(false)); com_Items.AddItem(COMVariant::createFromBoolean(true)); com_Items.AddItem(COMVariant::createFromBoolean(false)); com_Items.AddItem(COMVariant::createFromBoolean(true)); com_Items.AddItem(COMVariant::createFromBoolean(false)); } |
1336 |
How can I filter the check-boxes (method 1)
public void init() { COM com_Column,com_Editor,com_Items; anytype var_Column,var_Editor,var_Items; ; super(); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Check")); com_Column = var_Column; var_Editor = com_Column.Editor(); com_Editor = var_Editor; com_Editor.EditType(19/*CheckValueType*/); com_Editor.Option(17/*exCheckValue2*/,COMVariant::createFromInt(1)); com_Column.DisplayFilterButton(true); com_Column.DisplayFilterPattern(false); com_Column.FilterType(6/*exCheck*/); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(COMVariant::createFromBoolean(true)); com_Items.AddItem(COMVariant::createFromBoolean(true)); com_Items.AddItem(COMVariant::createFromBoolean(false)); com_Items.AddItem(COMVariant::createFromBoolean(true)); com_Items.AddItem(COMVariant::createFromBoolean(false)); com_Items.AddItem(COMVariant::createFromBoolean(true)); com_Items.AddItem(COMVariant::createFromBoolean(false)); } |
1335 |
How can add a button to control
// ButtonClick event - Occurs when user clicks on the cell's button. void onEvent_ButtonClick(int _Item,int _ColIndex,COMVariant _Key) { ; print( "ButtonClick" ); print( exg2antt1.Items().CellCaption(_Item,_ColIndex) ); print( _Key ); } public void init() { COM com_Column,com_Column1,com_Columns,com_Editor,com_Editor1,com_Items; COMVariant s; anytype var_Column,var_Column1,var_Columns,var_Editor,var_Editor1,var_Items; int h; str var_s; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DefaultItemHeight(22); exg2antt1.HeaderHeight(22); exg2antt1.Appearance(0/*None2*/); exg2antt1.DrawGridLines(-2/*exRowLines*/); exg2antt1.ScrollBySingleLine(false); var_s = "gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql"; var_s = var_s + "Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0"; var_s = var_s + "ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN"; var_s = var_s + "AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA="; exg2antt1.Images(COMVariant::createFromStr(var_s)); exg2antt1.HTMLPicture("pic1","c:\\exontrol\\images\\auction.gif"); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; var_Column = COM::createFromVariant(com_Columns.Add("Type")); com_Column = var_Column; com_Column.Width(48); com_Column.Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1)); var_Column1 = COM::createFromVariant(com_Columns.Add("Appearance")); com_Column1 = var_Column1; com_Column1.Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1)); com_Column1.Alignment(1/*CenterAlignment*/); com_Column1.HeaderAlignment(1/*CenterAlignment*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Items.<b>CellHasButton</b> property"); com_Items.CellValue(h,COMVariant::createFromInt(1),"Button <b>1</b>"); com_Items.CellHasButton(h,COMVariant::createFromInt(1),true); h = com_Items.AddItem("Items.<b>CellButtonAutoWidth</b> property"); com_Items.CellValue(h,COMVariant::createFromInt(1)," Button <b>2</b> "); com_Items.CellHasButton(h,COMVariant::createFromInt(1),true); com_Items.CellButtonAutoWidth(h,COMVariant::createFromInt(1),true); h = com_Items.AddItem("Items.<b>CellHasButton</b> property"); com_Items.CellValue(h,COMVariant::createFromInt(1)," <img>2</img>Button <b>3</b> "); com_Items.CellHasButton(h,COMVariant::createFromInt(1),true); com_Items.CellButtonAutoWidth(h,COMVariant::createFromInt(1),true); h = com_Items.AddItem("Items.<b>CellHasButton</b> property"); com_Items.ItemHeight(h,32); com_Items.CellValue(h,COMVariant::createFromInt(1)," <img>2</img>Button <b>4</b> <img>pic1</img> "); com_Items.CellHasButton(h,COMVariant::createFromInt(1),true); com_Items.CellButtonAutoWidth(h,COMVariant::createFromInt(1),true); h = com_Items.AddItem("Items.<b>CellHasButton</b> in splitted cells"); com_Items.CellValue(h,COMVariant::createFromInt(1)," Button <b>5.1</b> "); com_Items.CellHasButton(h,COMVariant::createFromInt(1),true); com_Items.CellButtonAutoWidth(h,COMVariant::createFromInt(1),true); s = com_Items.SplitCell(h,COMVariant::createFromInt(1)); com_Items.CellValue(COMVariant::createFromInt(0),s," Button <b>5.2</b> "); com_Items.CellHasButton(COMVariant::createFromInt(0),s,true); com_Items.CellButtonAutoWidth(COMVariant::createFromInt(0),s,true); h = com_Items.AddItem("Column.<b>Editor</b>, Items.<b>CellEditor</b>"); com_Items.CellValue(h,COMVariant::createFromInt(1),"Visible when clicking the cell"); var_Editor = com_Items.CellEditor(h,COMVariant::createFromInt(1)); com_Editor = var_Editor; com_Editor.EditType(1/*EditType*/); com_Editor.AddButton("B1",COMVariant::createFromInt(1),COMVariant::createFromInt(0),"This is a bit of text that's shown when the cursor hovers the button B1"); com_Editor.AddButton("B3",COMVariant::createFromInt(2),COMVariant::createFromInt(1),"This is a bit of text that's shown when the cursor hovers the button B3"); com_Editor.AddButton("B4",COMVariant::createFromInt(1),COMVariant::createFromInt(1),"This is a bit of text that's shown when the cursor hovers the button B4"); com_Editor.ButtonWidth(24); h = com_Items.AddItem("Column.<b>Editor</b>, Items.<b>CellEditor</b>"); com_Items.CellValue(h,COMVariant::createFromInt(1),COMVariant::createFromInt(3)); var_Editor1 = com_Items.CellEditor(h,COMVariant::createFromInt(1)); com_Editor1 = var_Editor1; com_Editor1.EditType(6/*CheckListType*/); com_Editor1.AddItem(1,"Flag 1"); com_Editor1.AddItem(2,"Flag 2"); com_Editor1.AddItem(4,"Flag 4"); com_Editor1.AddItem(8,"Flag 8"); com_Editor1.AddButton("C1",COMVariant::createFromInt(1),COMVariant::createFromInt(0),"This is a bit of text that's shown when the cursor hovers the button C1"); com_Editor1.AddButton("C3",COMVariant::createFromInt(2),COMVariant::createFromInt(0),"This is a bit of text that's shown when the cursor hovers the button C2"); com_Editor1.AddButton("C4",COMVariant::createFromInt(1),COMVariant::createFromInt(0),"This is a bit of text that's shown when the cursor hovers the button C3"); com_Editor1.ButtonWidth(24); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1334 |
Is it posible to store additional values against each item, cell, bar, link, such as custom values such string / numbers etc
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int h; ; super(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,96); COM::createFromVariant(exg2antt1.Columns().Add("Column")).Data("Extra_Data_Column"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Item 1"); com_Items.ItemData(h,"Extra_Data_Item 1"); com_Items.CellData(h,COMVariant::createFromInt(0),"Extra_Data_Item 1_Cell_0"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/4/2001",213)),"B1"); com_Items.ItemBar(h,"B1",17/*exBarData*/,"Extra_B1_Data"); h = com_Items.AddItem("Item 2"); com_Items.ItemData(h,"Extra_Data_Item 2"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("1/6/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"B2"); com_Items.ItemBar(h,"B2",17/*exBarData*/,"Extra_B2_Data"); com_Items.AddLink("L1",com_Items.FindItem("Item 1",COMVariant::createFromInt(0)),"B1",com_Items.FindItem("Item 2",COMVariant::createFromInt(0)),"B2"); com_Items.Link("L1",5/*exLinkUserData*/,"Extra_Link_Data"); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,96); } */ |
1333 |
How do I set the parent item to show the total number of days for its children and also the minimum and maximum dates for its children
public void init() { COM com_Chart,com_Columns,com_Items; anytype var_Chart,var_Columns,var_Items; int h,h1,h2,h3; ; super(); exg2antt1.BeginUpdate(); exg2antt1.MarkSearchColumn(false); exg2antt1.Indent(11); exg2antt1.HasLines(1/*exSolidLine*/); exg2antt1.Items().AllowCellValueToItemBar(true); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("Tasks"); COM::createFromVariant(com_Columns.Add("Start")).Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(1)); COM::createFromVariant(com_Columns.Add("End")).Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(2)); COM::createFromVariant(com_Columns.Add("Duration")).Def(18/*exCellValueToItemBarProperty*/,COMVariant::createFromInt(513)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.ShowNonworkingDates(false); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("9/20/2006",213))); com_Chart.AllowLinkBars(false); com_Chart.AllowCreateBar(0/*exNoCreateBar*/); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(0,220); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Project"); com_Items.AddBar(h,"Summary",COMVariant::createFromDate(str2Date("9/21/2006",213)),COMVariant::createFromDate(str2Date("10/3/2006",213))); h1 = com_Items.InsertItem(h,,"Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("9/21/2006",213)),COMVariant::createFromDate(str2Date("9/24/2006",213))); h2 = com_Items.InsertItem(h,,"Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("9/24/2006",213)),COMVariant::createFromDate(str2Date("9/28/2006",213))); h3 = com_Items.InsertItem(h,,"Task 3"); com_Items.AddBar(h3,"Task",COMVariant::createFromDate(str2Date("9/28/2006",213)),COMVariant::createFromDate(str2Date("10/3/2006",213))); com_Items.DefineSummaryBars(h,"",h1,""); com_Items.DefineSummaryBars(h,"",h2,""); com_Items.DefineSummaryBars(h,"",h3,""); com_Items.ExpandItem(h,true); com_Items.ItemBold(h,true); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(0,220); } */ |
1332 |
Is it possible to specify the distance between 2 bars to be at least 2 working days
// BarResizing event - Occurs when a bar is moving or resizing. void onEvent_BarResizing(int _Item,COMVariant _Key) { ; exg2antt1.Items().SchedulePDM(_Item,_Key); } public void init() { COM com_Bar,com_Bars,com_Chart,com_Items; anytype var_Bar,var_Bars,var_Chart,var_Items; int h1,h2,h3; ; super(); exg2antt1.BeginUpdate(); exg2antt1.DefaultItemHeight(24); exg2antt1.AntiAliasing(true); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); var_Bars = COM::createFromObject(com_Chart.Bars()); com_Bars = var_Bars; var_Bar = COM::createFromObject(com_Bars).Add("Task:Split"); com_Bar = var_Bar; com_Bar.Shortcut("Task"); com_Bar.Color(WinApi::RGB2int(0,0,0)); com_Bar.Height(17); com_Bar.Pattern(8192/*exPatternFrameShadow*/); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/3/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.LinksWidth(2); com_Chart.AllowCreateBar(0/*exNoCreateBar*/); com_Chart.AllowLinkBars(false); com_Chart.FirstWeekDay(1/*exMonday*/); com_Chart.NonworkingDaysPattern(6/*exPatternBDiagonal*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h1 = com_Items.AddItem("Task 1"); com_Items.AddBar(h1,"Task",COMVariant::createFromDate(str2Date("1/4/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K1"); com_Items.ItemBar(h1,"K1",20/*exBarKeepWorkingCount*/,COMVariant::createFromBoolean(true)); h2 = com_Items.AddItem("Task 2"); com_Items.AddBar(h2,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/5/2001",213)),"K2"); com_Items.ItemBar(h2,"K2",20/*exBarKeepWorkingCount*/,COMVariant::createFromBoolean(true)); com_Items.AddLink("L1",h1,"K1",h2,"K2"); com_Items.Link("L1",15/*exLinkShowRound*/,COMVariant::createFromInt(-1)); com_Items.Link("L1",8/*exLinkColor*/,COMVariant::createFromInt(8421504)); h3 = com_Items.AddItem("Task 3"); com_Items.AddBar(h3,"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K3"); com_Items.ItemBar(h3,"K3",20/*exBarKeepWorkingCount*/,COMVariant::createFromBoolean(true)); com_Items.AddLink("L2",h2,"K2",h3,"K3"); com_Items.Link("L2",12/*exLinkText*/,"<br><br><br><br>This link <u>delays</u> the bars<br>with <b>2</b> working days"); com_Items.Link("L2",16/*exLinkPDMWorkingDelay*/,COMVariant::createFromInt(2)); com_Items.Link("L2",15/*exLinkShowRound*/,COMVariant::createFromInt(-1)); com_Items.SchedulePDM(0,"K1"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1331 |
The item is not getting selected when clicking the cell's checkbox. What should I do
// CellStateChanged event - Fired after cell's state has been changed. void onEvent_CellStateChanged(int _Item,int _ColIndex) { ; exg2antt1.Items().SelectItem(_Item,true); } public void init() { COM com_Items; anytype var_Items; ; super(); COM::createFromVariant(exg2antt1.Columns().Add("Check")).Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true)); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(COMVariant::createFromInt(0)); com_Items.AddItem(COMVariant::createFromInt(1)); com_Items.AddItem(COMVariant::createFromInt(2)); com_Items.AddItem(COMVariant::createFromInt(3)); } |
1330 |
How can I add a summary item as a child or subitem of another one
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; int hChild,hSummary; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,96); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2011",213))); com_Chart.LevelCount(2); exg2antt1.Columns().Add("Default"); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); var_Items = exg2antt1.Items(); com_Items = var_Items; hSummary = com_Items.AddItem("Project"); com_Items.AddBar(hSummary,"Summary",COMVariant::createFromDate(str2Date("1/1/2011",213)),COMVariant::createFromDate(str2Date("1/1/2011",213)),"Sum"); hChild = com_Items.InsertItem(hSummary,COMVariant::createFromInt(0),"Task 1"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("1/2/2011",213)),COMVariant::createFromDate(str2Date("1/4/2011",213)),"Task1"); com_Items.DefineSummaryBars(hSummary,"Sum",hChild,"Task1"); hChild = com_Items.InsertItem(hSummary,COMVariant::createFromInt(0),"Task 2"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("1/4/2011",213)),COMVariant::createFromDate(str2Date("1/6/2011",213)),"Task2"); com_Items.DefineSummaryBars(hSummary,"Sum",hChild,"Task2"); hChild = com_Items.InsertItem(hSummary,COMVariant::createFromInt(0),"Task 3"); com_Items.AddBar(hChild,"Task",COMVariant::createFromDate(str2Date("1/6/2011",213)),COMVariant::createFromDate(str2Date("1/8/2011",213)),"Task3"); com_Items.DefineSummaryBars(hSummary,"Sum",hChild,"Task3"); com_Items.ExpandItem(hSummary,true); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,96); } */ |
1329 |
How can I make an item a subitem of another one
public void init() { COM com_Items; anytype var_Items; int hChild,hSummary; ; super(); exg2antt1.BeginUpdate(); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); exg2antt1.Columns().Add("Default"); var_Items = exg2antt1.Items(); com_Items = var_Items; hSummary = com_Items.AddItem("Project"); hChild = com_Items.InsertItem(hSummary,COMVariant::createFromInt(0),"Task 1"); hChild = com_Items.InsertItem(hSummary,COMVariant::createFromInt(0),"Task 2"); hChild = com_Items.InsertItem(hSummary,COMVariant::createFromInt(0),"Task 3"); com_Items.ExpandItem(hSummary,true); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1328 |
Is it possible to move a bar per drag and drop to another owner/item
public void init() { COM com_Bar,com_Chart,com_Items; anytype var_Bar,var_Chart,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); COM::createFromVariant(exg2antt1.Columns().Add("Members")).Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1)); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("9/20/2006",213))); com_Chart.AllowLinkBars(false); com_Chart.AllowCreateBar(0/*exNoCreateBar*/); com_Chart.AllowSelectObjects(0/*exNoSelectObjects*/); com_Chart.LevelCount(2); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,96); var_Bar = COM::createFromObject(com_Chart.Bars()).Item("Task"); com_Bar = var_Bar; com_Bar.OverlaidType(4611/*exOverlaidBarsIncludeCaption | exOverlaidBarsStackAutoArrange | exOverlaidBarsStack*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Member <b>1</b>"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("9/21/2006",213)),COMVariant::createFromDate(str2Date("9/23/2006",213)),"T102","Task <b>102</b>"); com_Items.ItemBar(h,"T102",4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); com_Items.ItemBar(h,"T102",28/*exBarCanMoveToAnother*/,COMVariant::createFromBoolean(true)); h = com_Items.AddItem("Member <b>2</b>"); h = com_Items.AddItem("Member <b>3</b>"); h = com_Items.AddItem("Member <b>4</b>"); com_Items.AddBar(h,"Task",COMVariant::createFromDate(str2Date("9/21/2006",213)),COMVariant::createFromDate(str2Date("9/23/2006",213)),"T103","Task <b>103</b>"); com_Items.ItemBar(h,"T103",4/*exBarHAlignCaption*/,COMVariant::createFromInt(18)); com_Items.ItemBar(h,"T103",28/*exBarCanMoveToAnother*/,COMVariant::createFromBoolean(true)); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,96); } */ |
1327 |
I have the chart displaying days, is it possible to display bars/tasks up to hours so inside days somehow
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.LevelCount(2); com_Chart.UnitWidth(38); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,28); com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("3/4/2011",213))); com_Chart.UnitScale(4096/*exDay*/); com_Chart.ResizeUnitScale(65536/*exHour*/); exg2antt1.Columns().Add("Default"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("ASS"),"Task",COMVariant::createFromDate(str2Date("3/7/2011",213)),COMVariant::createFromUtcDateTime(str2Datetime("3/7/2011 3:30:00",213))); com_Items.AddBar(com_Items.AddItem("EMB"),"Task",COMVariant::createFromUtcDateTime(str2Datetime("3/7/2011 3:30:00",213)),COMVariant::createFromUtcDateTime(str2Datetime("3/8/2011 9:15:00",213))); com_Items.AddBar(com_Items.AddItem("TES"),"Task",COMVariant::createFromUtcDateTime(str2Datetime("3/8/2011 9:15:00",213)),COMVariant::createFromUtcDateTime(str2Datetime("3/8/2011 13:45:00",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,28); } */ |
1326 |
Is it possible to limit the height of the item while resizing
// AddItem event - Occurs after a new Item has been inserted to Items collection. void onEvent_AddItem(int _Item) { ; exg2antt1.Items().ItemMinHeight(_Item,18); exg2antt1.Items().ItemMaxHeight(_Item,72); } public void init() { COM com_Column,com_Items; anytype var_Column,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.ItemsAllowSizing(-1/*exResizeItem*/); exg2antt1.ScrollBySingleLine(false); exg2antt1.BackColorAlternate(WinApi::RGB2int(240,240,240)); exg2antt1.Columns().Add("Names"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem("Mantel"); com_Items.AddItem("Mechanik"); com_Items.AddItem("Motor"); com_Items.AddItem("Murks"); com_Items.AddItem("Märchen"); com_Items.AddItem("Möhren"); com_Items.AddItem("Mühle"); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(COMVariant::createFromInt(0)); com_Column = var_Column; com_Column.SortOrder(1/*SortAscending*/); exg2antt1.EndUpdate(); } |
1325 |
Is it possible to copy the hierarchy of the control using the GetItems method
public void init() { COM com_Items; anytype var_Items; int h; ; super(); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); exg2antt1.Columns().Add("Def"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Root"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); exg2antt1.PutItems(exg2antt1.GetItems(COMVariant::createFromInt(-1))); } |
1324 |
I have found a property ReadOnly but this doesn't work correctly. I need the chart part of the control to be readonly too. Is it possible
public void init() { COM com_Chart; anytype var_Chart; ; super(); exg2antt1.ReadOnly(-1/*exReadOnly*/); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.AllowCreateBar(0/*exNoCreateBar*/); com_Chart.BarsAllowSizing(false); com_Chart.AllowLinkBars(false); } |
1323 |
How can I select a column
// MouseDown event - Occurs when the user presses a mouse button. void onEvent_MouseDown(int _Button,int _Shift,int _X,int _Y) { COM com_Column; anytype var_Column; ; exg2antt1.BeginUpdate(); var_Column = COM::createFromObject(exg2antt1.Columns()).Item(exg2antt1.ColumnFromPoint(_X,_Y)); com_Column = var_Column; com_Column.Selected(true); exg2antt1.Items().SelectAll(); exg2antt1.EndUpdate(); } public void init() { COM com_Column,com_Columns,com_Items; anytype var_Column,var_Columns,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.MarkSearchColumn(false); exg2antt1.SingleSel(false); exg2antt1.FullRowSelect(1/*exRectSel*/); exg2antt1.SortOnClick(0/*exNoSort*/); var_Columns = exg2antt1.Columns(); com_Columns = var_Columns; com_Columns.Add("Column1"); com_Columns.Add("Column2"); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.CellValue(com_Items.AddItem("One"),COMVariant::createFromInt(1),"One"); com_Items.CellValue(com_Items.AddItem("Two"),COMVariant::createFromInt(1),"Two"); exg2antt1.EndUpdate(); } |
1322 |
I have several columns, but noticed that the filter is using AND between columns, but I need OR clause for filtering. Is it possible
public void init() { COM com_Column,com_Column1,com_Items; anytype var_Column,var_Column1,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Item")); com_Column = var_Column; com_Column.DisplayFilterButton(true); com_Column.DisplayFilterPattern(false); com_Column.Filter("Child 1"); com_Column.FilterType(240/*exFilter*/); var_Column1 = COM::createFromVariant(exg2antt1.Columns().Add("Date")); com_Column1 = var_Column1; com_Column1.DisplayFilterButton(true); com_Column1.DisplayFilterPattern(false); com_Column1.DisplayFilterDate(true); com_Column1.FilterList(9474/*exShowExclude | exShowFocusItem | exShowCheckBox | exNoItems*/); com_Column1.Filter(str2Date("12/28/2010",213)); com_Column1.FilterType(4/*exDate*/); exg2antt1.FilterCriteria("%0 or %1"); exg2antt1.Description(23/*exFilterBarOr*/,"<font ;18><fgcolor=FF0000>or</fgcolor></font>"); exg2antt1.Description(11/*exFilterBarAnd*/,"<font ;18><fgcolor=FF0000>and</fgcolor></font>"); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Root 1"); com_Items.CellValue(com_Items.InsertItem(h,,"Child 1"),COMVariant::createFromInt(1),COMVariant::createFromDate(str2Date("12/27/2010",213))); com_Items.CellValue(com_Items.InsertItem(h,,"Child 2"),COMVariant::createFromInt(1),COMVariant::createFromDate(str2Date("12/28/2010",213))); com_Items.ExpandItem(h,true); h = com_Items.AddItem("Root 2"); com_Items.CellValue(com_Items.InsertItem(h,,"Child 1"),COMVariant::createFromInt(1),COMVariant::createFromDate(str2Date("12/29/2010",213))); com_Items.CellValue(com_Items.InsertItem(h,,"Child 2"),COMVariant::createFromInt(1),COMVariant::createFromDate(str2Date("12/30/2010",213))); exg2antt1.ApplyFilter(); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1321 |
Is it possible exclude the dates being selected in the drop down filter window
public void init() { COM com_Column,com_Items; anytype var_Column,var_Items; ; super(); exg2antt1.BeginUpdate(); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Date")); com_Column = var_Column; com_Column.SortType(2/*SortDate*/); com_Column.DisplayFilterButton(true); com_Column.DisplayFilterPattern(false); com_Column.DisplayFilterDate(true); com_Column.FilterList(9474/*exShowExclude | exShowFocusItem | exShowCheckBox | exNoItems*/); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(COMVariant::createFromDate(str2Date("12/27/2010",213))); com_Items.AddItem(COMVariant::createFromDate(str2Date("12/28/2010",213))); com_Items.AddItem(COMVariant::createFromDate(str2Date("12/29/2010",213))); com_Items.AddItem(COMVariant::createFromDate(str2Date("12/30/2010",213))); com_Items.AddItem(COMVariant::createFromDate(str2Date("12/31/2010",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1320 |
How can I display a calendar control inside the drop down filter window
public void init() { COM com_Column,com_Items; anytype var_Column,var_Items; ; super(); exg2antt1.BeginUpdate(); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Date")); com_Column = var_Column; com_Column.SortType(2/*SortDate*/); com_Column.DisplayFilterButton(true); com_Column.DisplayFilterPattern(false); com_Column.DisplayFilterDate(true); com_Column.FilterList(1282/*exShowFocusItem | exShowCheckBox | exNoItems*/); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(COMVariant::createFromDate(str2Date("12/27/2010",213))); com_Items.AddItem(COMVariant::createFromDate(str2Date("12/28/2010",213))); com_Items.AddItem(COMVariant::createFromDate(str2Date("12/29/2010",213))); com_Items.AddItem(COMVariant::createFromDate(str2Date("12/30/2010",213))); com_Items.AddItem(COMVariant::createFromDate(str2Date("12/31/2010",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1319 |
Is it possible to include the dates as checkb-boxes in the drop down filter window
public void init() { COM com_Column,com_Items; anytype var_Column,var_Items; ; super(); exg2antt1.BeginUpdate(); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Dates")); com_Column = var_Column; com_Column.SortType(2/*SortDate*/); com_Column.DisplayFilterButton(true); com_Column.DisplayFilterPattern(true); com_Column.DisplayFilterDate(true); com_Column.FilterList(1280/*exShowFocusItem | exShowCheckBox*/); com_Column.Filter("to 12/27/2010"); com_Column.FilterType(4/*exDate*/); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(COMVariant::createFromDate(str2Date("12/27/2010",213))); com_Items.AddItem(COMVariant::createFromDate(str2Date("12/28/2010",213))); com_Items.AddItem(COMVariant::createFromDate(str2Date("12/29/2010",213))); com_Items.AddItem(COMVariant::createFromDate(str2Date("12/30/2010",213))); com_Items.AddItem(COMVariant::createFromDate(str2Date("12/31/2010",213))); exg2antt1.ApplyFilter(); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1318 |
How can I filter items for dates before a specified date
public void init() { COM com_Column,com_Items; anytype var_Column,var_Items; ; super(); exg2antt1.BeginUpdate(); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Dates")); com_Column = var_Column; com_Column.SortType(2/*SortDate*/); com_Column.DisplayFilterButton(true); com_Column.DisplayFilterPattern(true); com_Column.DisplayFilterDate(true); com_Column.FilterList(1026/*exShowFocusItem | exNoItems*/); com_Column.Filter("to 12/27/2010"); com_Column.FilterType(4/*exDate*/); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(COMVariant::createFromDate(str2Date("12/27/2010",213))); com_Items.AddItem(COMVariant::createFromDate(str2Date("12/28/2010",213))); com_Items.AddItem(COMVariant::createFromDate(str2Date("12/29/2010",213))); com_Items.AddItem(COMVariant::createFromDate(str2Date("12/30/2010",213))); com_Items.AddItem(COMVariant::createFromDate(str2Date("12/31/2010",213))); exg2antt1.ApplyFilter(); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1317 |
Is it possible to filter dates
public void init() { COM com_Column,com_Items; anytype var_Column,var_Items; ; super(); exg2antt1.BeginUpdate(); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Dates")); com_Column = var_Column; com_Column.SortType(2/*SortDate*/); com_Column.DisplayFilterButton(true); com_Column.DisplayFilterPattern(true); com_Column.DisplayFilterDate(true); com_Column.FilterList(1026/*exShowFocusItem | exNoItems*/); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddItem(COMVariant::createFromDate(str2Date("12/27/2010",213))); com_Items.AddItem(COMVariant::createFromDate(str2Date("12/28/2010",213))); com_Items.AddItem(COMVariant::createFromDate(str2Date("12/29/2010",213))); com_Items.AddItem(COMVariant::createFromDate(str2Date("12/30/2010",213))); com_Items.AddItem(COMVariant::createFromDate(str2Date("12/31/2010",213))); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1316 |
Is it possible to change the Exclude field name to something different, in the drop down filter window
public void init() { COM com_Column,com_Items; anytype var_Column,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); exg2antt1.Description(25/*exFilterBarExclude*/,"Leaving out"); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Items")); com_Column = var_Column; com_Column.DisplayFilterButton(true); com_Column.DisplayFilterPattern(false); com_Column.FilterList(9472/*exShowExclude | exShowFocusItem | exShowCheckBox*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Root 1"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); com_Items.ExpandItem(h,true); h = com_Items.AddItem("Root 2"); com_Items.InsertItem(h,,"Child 1"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1315 |
How can I display the Exclude field in the drop down filter window
public void init() { COM com_Column,com_Items; anytype var_Column,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Items")); com_Column = var_Column; com_Column.DisplayFilterButton(true); com_Column.DisplayFilterPattern(false); com_Column.FilterList(9472/*exShowExclude | exShowFocusItem | exShowCheckBox*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Root 1"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); com_Items.ExpandItem(h,true); h = com_Items.AddItem("Root 2"); com_Items.InsertItem(h,,"Child 1"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1314 |
Is it possible to show and ensure the focused item from the control, in the drop down filter window
public void init() { COM com_Column,com_Items; anytype var_Column,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Items")); com_Column = var_Column; com_Column.DisplayFilterButton(true); com_Column.DisplayFilterPattern(false); com_Column.FilterList(1280/*exShowFocusItem | exShowCheckBox*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Root 1"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); com_Items.ExpandItem(h,true); h = com_Items.AddItem("Root 2"); com_Items.InsertItem(h,,"Child 1"); com_Items.SelectItem(com_Items.InsertItem(h,,"Child 2"),true); com_Items.ExpandItem(h,true); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1313 |
Is it possible to show only blanks items with no listed items from the control
public void init() { COM com_Column,com_Items; anytype var_Column,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Items")); com_Column = var_Column; com_Column.DisplayFilterButton(true); com_Column.DisplayFilterPattern(false); com_Column.FilterList(16386/*exShowBlanks | exNoItems*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Root 1"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); com_Items.ExpandItem(h,true); h = com_Items.AddItem("Root 2"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1312 |
How can I include the blanks items in the drop down filter window
public void init() { COM com_Column,com_Items; anytype var_Column,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Items")); com_Column = var_Column; com_Column.DisplayFilterButton(true); com_Column.DisplayFilterPattern(false); com_Column.FilterList(16640/*exShowBlanks | exShowCheckBox*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Root 1"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); com_Items.ExpandItem(h,true); h = com_Items.AddItem("Root 2"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1311 |
How can I select multiple items in the drop down filter window, using check-boxes
public void init() { COM com_Column,com_Items; anytype var_Column,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Items")); com_Column = var_Column; com_Column.DisplayFilterButton(true); com_Column.DisplayFilterPattern(false); com_Column.FilterList(256/*exShowCheckBox*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Root 1"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); com_Items.ExpandItem(h,true); h = com_Items.AddItem("Root 2"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1310 |
Is it possible to allow a single item being selected in the drop down filter window
public void init() { COM com_Column,com_Items; anytype var_Column,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Items")); com_Column = var_Column; com_Column.DisplayFilterButton(true); com_Column.DisplayFilterPattern(false); com_Column.FilterList(128/*exSingleSel*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Root 1"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); com_Items.ExpandItem(h,true); h = com_Items.AddItem("Root 2"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1309 |
How can I display no (All) item in the drop down filter window
public void init() { COM com_Column,com_Items; anytype var_Column,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); exg2antt1.Description(0/*exFilterBarAll*/,""); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Items")); com_Column = var_Column; com_Column.DisplayFilterButton(true); com_Column.DisplayFilterPattern(true); com_Column.FilterList(2/*exNoItems*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Root 1"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); com_Items.ExpandItem(h,true); h = com_Items.AddItem("Root 2"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1308 |
Is it possible to display no items in the drop down filter window, so only the pattern is visible
public void init() { COM com_Column,com_Items; anytype var_Column,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Items")); com_Column = var_Column; com_Column.DisplayFilterButton(true); com_Column.DisplayFilterPattern(true); com_Column.FilterList(2/*exNoItems*/); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Root 1"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); com_Items.ExpandItem(h,true); h = com_Items.AddItem("Root 2"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1307 |
How can I specify the time-scale available when zoom-in/zoom-out or enlarging the chart
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.ShowNonworkingDates(false); com_Chart.LevelCount(3); com_Chart.UnitScale(4096/*exDay*/); com_Chart.AllowResizeChart(262/*exAllowChangeUnitScale | exAllowResizeChartMiddle | exAllowResizeChartHeader*/); com_Chart.Label(65536/*exHour*/,""); com_Chart.Label(1048576/*exMinute*/,""); com_Chart.Label(16777216/*exSecond*/,""); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task A"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K1"); com_Items.AddBar(com_Items.AddItem("Task B"),"Task",COMVariant::createFromDate(str2Date("1/6/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"K1"); com_Items.AddBar(com_Items.AddItem("Task C"),"Task",COMVariant::createFromDate(str2Date("1/10/2001",213)),COMVariant::createFromDate(str2Date("1/14/2001",213)),"K1"); com_Items.AddBar(com_Items.AddItem(""),"",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"Info","Click the <b>middle</b> mouse button and start dragging"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1306 |
How can I enable zoom-in/zoom-out or enlarging the chart, using the mouse middle button
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.ShowNonworkingDates(false); com_Chart.LevelCount(3); com_Chart.UnitScale(4096/*exDay*/); com_Chart.AllowResizeChart(262/*exAllowChangeUnitScale | exAllowResizeChartMiddle | exAllowResizeChartHeader*/); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task A"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K1"); com_Items.AddBar(com_Items.AddItem("Task B"),"Task",COMVariant::createFromDate(str2Date("1/6/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"K1"); com_Items.AddBar(com_Items.AddItem("Task C"),"Task",COMVariant::createFromDate(str2Date("1/10/2001",213)),COMVariant::createFromDate(str2Date("1/14/2001",213)),"K1"); com_Items.AddBar(com_Items.AddItem(""),"",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"Info","Click the <b>middle</b> mouse button and start dragging"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1305 |
How can I enable zoom-in/zoom-out or enlarging, using the chart's header
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.ShowNonworkingDates(false); com_Chart.LevelCount(3); com_Chart.UnitScale(4096/*exDay*/); com_Chart.AllowResizeChart(258/*exAllowChangeUnitScale | exAllowResizeChartHeader*/); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task A"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K1"); com_Items.AddBar(com_Items.AddItem("Task B"),"Task",COMVariant::createFromDate(str2Date("1/6/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"K1"); com_Items.AddBar(com_Items.AddItem("Task C"),"Task",COMVariant::createFromDate(str2Date("1/10/2001",213)),COMVariant::createFromDate(str2Date("1/14/2001",213)),"K1"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1304 |
How can I enable resizing the chart, using the mouse middle button
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.ShowNonworkingDates(false); com_Chart.LevelCount(3); com_Chart.UnitScale(4096/*exDay*/); com_Chart.AllowResizeChart(6/*exAllowResizeChartMiddle | exAllowResizeChartHeader*/); com_Chart.MaxUnitWidth(128); com_Chart.MinUnitWidth(8); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task A"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K1"); com_Items.AddBar(com_Items.AddItem("Task B"),"Task",COMVariant::createFromDate(str2Date("1/6/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"K1"); com_Items.AddBar(com_Items.AddItem("Task C"),"Task",COMVariant::createFromDate(str2Date("1/10/2001",213)),COMVariant::createFromDate(str2Date("1/14/2001",213)),"K1"); com_Items.AddBar(com_Items.AddItem(""),"",COMVariant::createFromDate(str2Date("1/8/2001",213)),COMVariant::createFromDate(str2Date("1/8/2001",213)),"Info","Click the <b>middle</b> mouse button and start dragging"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1303 |
How can I enable resizing the chart, using the chart's header
public void init() { COM com_Chart,com_Items; anytype var_Chart,var_Items; ; super(); exg2antt1.BeginUpdate(); exg2antt1.Columns().Add("Task"); var_Chart = exg2antt1.Chart(); com_Chart = var_Chart; com_Chart.FirstVisibleDate(COMVariant::createFromDate(str2Date("1/1/2001",213))); /*should be called during the form's activate method*/ com_Chart.PaneWidth(false,48); com_Chart.ShowNonworkingDates(false); com_Chart.LevelCount(3); com_Chart.UnitScale(4096/*exDay*/); com_Chart.AllowResizeChart(2/*exAllowResizeChartHeader*/); com_Chart.MaxUnitWidth(128); com_Chart.MinUnitWidth(8); var_Items = exg2antt1.Items(); com_Items = var_Items; com_Items.AddBar(com_Items.AddItem("Task A"),"Task",COMVariant::createFromDate(str2Date("1/2/2001",213)),COMVariant::createFromDate(str2Date("1/6/2001",213)),"K1"); com_Items.AddBar(com_Items.AddItem("Task B"),"Task",COMVariant::createFromDate(str2Date("1/6/2001",213)),COMVariant::createFromDate(str2Date("1/10/2001",213)),"K1"); com_Items.AddBar(com_Items.AddItem("Task C"),"Task",COMVariant::createFromDate(str2Date("1/10/2001",213)),COMVariant::createFromDate(str2Date("1/14/2001",213)),"K1"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(false,48); } */ |
1302 |
Is it possible to auto-numbering the children items but still keeps the position after filtering
public void init() { COM com_Column,com_Column1,com_Column2,com_Column3,com_Column4,com_Column5,com_Column6,com_Items; anytype var_Column,var_Column1,var_Column2,var_Column3,var_Column4,var_Column5,var_Column6,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Items")); com_Column = var_Column; com_Column.DisplayFilterButton(true); com_Column.FilterType(240/*exFilter*/); com_Column.Filter("Child 2"); var_Column1 = COM::createFromVariant(exg2antt1.Columns().Add("Pos.1")); com_Column1 = var_Column1; com_Column1.FormatColumn("1 ropos ''"); com_Column1.Position(0); com_Column1.Width(32); com_Column1.AllowSizing(false); var_Column2 = COM::createFromVariant(exg2antt1.Columns().Add("Pos.2")); com_Column2 = var_Column2; com_Column2.FormatColumn("1 ropos ':'"); com_Column2.Position(1); com_Column2.Width(32); com_Column2.AllowSizing(false); var_Column3 = COM::createFromVariant(exg2antt1.Columns().Add("Pos.3")); com_Column3 = var_Column3; com_Column3.FormatColumn("1 ropos ':|A-Z'"); com_Column3.Position(2); com_Column3.Width(32); com_Column3.AllowSizing(false); var_Column4 = COM::createFromVariant(exg2antt1.Columns().Add("Pos.4")); com_Column4 = var_Column4; com_Column4.FormatColumn("1 ropos '|A-Z|'"); com_Column4.Position(3); com_Column4.Width(32); com_Column4.AllowSizing(false); var_Column5 = COM::createFromVariant(exg2antt1.Columns().Add("Pos.5")); com_Column5 = var_Column5; com_Column5.FormatColumn("'<font Tahoma;7>' + 1 ropos '-<b>||A-Z'"); com_Column5.Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1)); com_Column5.Position(4); com_Column5.Width(32); com_Column5.AllowSizing(false); var_Column6 = COM::createFromVariant(exg2antt1.Columns().Add("Pos.6")); com_Column6 = var_Column6; com_Column6.FormatColumn("'<b>'+ 1 ropos '</b>:<fgcolor=FF0000>|A-Z|'"); com_Column6.Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1)); com_Column6.Position(5); com_Column6.Width(48); com_Column6.AllowSizing(false); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Root 1"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); com_Items.ExpandItem(h,true); h = com_Items.AddItem("Root 2"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); exg2antt1.ApplyFilter(); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |
1301 |
Is it possible to auto-numbering the children items too
public void init() { COM com_Column,com_Column1,com_Column2,com_Column3,com_Column4,com_Column5,com_Items; anytype var_Column,var_Column1,var_Column2,var_Column3,var_Column4,var_Column5,var_Items; int h; ; super(); exg2antt1.BeginUpdate(); /*should be called during the form's activate method*/ exg2antt1.Chart().PaneWidth(true,0); exg2antt1.LinesAtRoot(-1/*exLinesAtRoot*/); exg2antt1.Columns().Add("Items"); var_Column = COM::createFromVariant(exg2antt1.Columns().Add("Pos.1")); com_Column = var_Column; com_Column.FormatColumn("1 rpos ''"); com_Column.Position(0); com_Column.Width(32); com_Column.AllowSizing(false); var_Column1 = COM::createFromVariant(exg2antt1.Columns().Add("Pos.2")); com_Column1 = var_Column1; com_Column1.FormatColumn("1 rpos ':'"); com_Column1.Position(1); com_Column1.Width(32); com_Column1.AllowSizing(false); var_Column2 = COM::createFromVariant(exg2antt1.Columns().Add("Pos.3")); com_Column2 = var_Column2; com_Column2.FormatColumn("1 rpos ':|A-Z'"); com_Column2.Position(2); com_Column2.Width(32); com_Column2.AllowSizing(false); var_Column3 = COM::createFromVariant(exg2antt1.Columns().Add("Pos.4")); com_Column3 = var_Column3; com_Column3.FormatColumn("1 rpos '|A-Z|'"); com_Column3.Position(3); com_Column3.Width(32); com_Column3.AllowSizing(false); var_Column4 = COM::createFromVariant(exg2antt1.Columns().Add("Pos.5")); com_Column4 = var_Column4; com_Column4.FormatColumn("'<font Tahoma;7>' + 1 rpos '-<b>||A-Z'"); com_Column4.Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1)); com_Column4.Position(4); com_Column4.Width(32); com_Column4.AllowSizing(false); var_Column5 = COM::createFromVariant(exg2antt1.Columns().Add("Pos.6")); com_Column5 = var_Column5; com_Column5.FormatColumn("'<b>'+ 1 rpos '</b>:<fgcolor=FF0000>|A-Z|'"); com_Column5.Def(17/*exCellValueFormat*/,COMVariant::createFromInt(1)); com_Column5.Position(5); com_Column5.Width(48); com_Column5.AllowSizing(false); var_Items = exg2antt1.Items(); com_Items = var_Items; h = com_Items.AddItem("Root 1"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); com_Items.ExpandItem(h,true); h = com_Items.AddItem("Root 2"); com_Items.InsertItem(h,,"Child 1"); com_Items.InsertItem(h,,"Child 2"); exg2antt1.EndUpdate(); } /* public void activate(boolean _active) { ; super(_active); exg2antt1.Chart().PaneWidth(true,0); } */ |